On Tuesday, 17 April 2012 at 18:39:16 UTC, Xan wrote:
On Tuesday, 17 April 2012 at 18:25:21 UTC, Ali Çehreli wrote:
On 04/17/2012 11:13 AM, Xan wrote:
> The idea is behind this https://gist.github.com/2407923
> But I receive:
>
> $ gdmd-4.6 algorisme_code.d
> algorisme_code.d:22: Error: variabl
On Tuesday, 17 April 2012 at 18:25:21 UTC, Ali Çehreli wrote:
On 04/17/2012 11:13 AM, Xan wrote:
> The idea is behind this https://gist.github.com/2407923
> But I receive:
>
> $ gdmd-4.6 algorisme_code.d
> algorisme_code.d:22: Error: variable codi cannot be read at
compile time
> algorisme_code.
On 04/17/2012 11:13 AM, Xan wrote:
> The idea is behind this https://gist.github.com/2407923
> But I receive:
>
> $ gdmd-4.6 algorisme_code.d
> algorisme_code.d:22: Error: variable codi cannot be read at compile time
> algorisme_code.d:22: Error: argument to mixin must be a string, not
(codi)
On Tuesday, 17 April 2012 at 18:00:55 UTC, Xan wrote:
On Tuesday, 17 April 2012 at 15:59:25 UTC, Ali Çehreli wrote:
On 04/17/2012 08:42 AM, Xan wrote:
> How to get the "code" of a function or delegate
>
> |___string toString() {
> |___|___return format("%s (versió %s): Domini -> Recorregut,
%s(
On Tuesday, 17 April 2012 at 18:00:55 UTC, Xan wrote:
On Tuesday, 17 April 2012 at 15:59:25 UTC, Ali Çehreli wrote:
On 04/17/2012 08:42 AM, Xan wrote:
> How to get the "code" of a function or delegate
>
> |___string toString() {
> |___|___return format("%s (versió %s): Domini -> Recorregut,
%s(
On Tuesday, 17 April 2012 at 15:59:25 UTC, Ali Çehreli wrote:
On 04/17/2012 08:42 AM, Xan wrote:
> How to get the "code" of a function or delegate
>
> |___string toString() {
> |___|___return format("%s (versió %s): Domini -> Recorregut,
%s(x) =
> %s", nom, versio, nom, &funcio);
>
> |___}
>
> d
On 04/17/2012 08:42 AM, Xan wrote:
> How to get the "code" of a function or delegate
>
> |___string toString() {
> |___|___return format("%s (versió %s): Domini -> Recorregut, %s(x) =
> %s", nom, versio, nom, &funcio);
>
> |___}
>
> does not produce the desired result and &funcio without ampersan
On Tuesday, 17 April 2012 at 15:30:36 UTC, Ali Çehreli wrote:
On 04/17/2012 08:17 AM, Xan wrote:
Off-topic, could can I define toString having this structure:
(versió ): ->
,
?
(For example, in https://gist.github.com/2394274 I want that
Doblar
displays as:
Doblar (versió 1): int -> in
On 04/17/2012 08:17 AM, Xan wrote:
Off-topic, could can I define toString having this structure:
(versió ): -> ,
?
(For example, in https://gist.github.com/2394274 I want that Doblar
displays as:
Doblar (versió 1): int -> int, { return 2 * a; }
Thanks a lot,
Xan.
std.string.format is ea
On Tuesday, 17 April 2012 at 15:21:30 UTC, Dejan Lekic wrote:
On Tuesday, 17 April 2012 at 14:57:18 UTC, Xan wrote:
On Tuesday, 17 April 2012 at 01:31:43 UTC, Kenji Hara wrote:
On Monday, 16 April 2012 at 18:48:52 UTC, Xan wrote:
On Sunday, 15 April 2012 at 19:30:27 UTC, Ali Çehreli wrote:
On
On Tuesday, 17 April 2012 at 14:57:18 UTC, Xan wrote:
On Tuesday, 17 April 2012 at 01:31:43 UTC, Kenji Hara wrote:
On Monday, 16 April 2012 at 18:48:52 UTC, Xan wrote:
On Sunday, 15 April 2012 at 19:30:27 UTC, Ali Çehreli wrote:
On 04/15/2012 11:39 AM, Xan wrote:
> On Sunday, 15 April 2012 at
Off-topic, could can I define toString having this structure:
(versió ): ->
,
?
(For example, in https://gist.github.com/2394274 I want that
Doblar displays as:
Doblar (versió 1): int -> int, { return 2 * a; }
Thanks a lot,
Xan.
On Tuesday, 17 April 2012 at 01:31:43 UTC, Kenji Hara wrote:
On Monday, 16 April 2012 at 18:48:52 UTC, Xan wrote:
On Sunday, 15 April 2012 at 19:30:27 UTC, Ali Çehreli wrote:
On 04/15/2012 11:39 AM, Xan wrote:
> On Sunday, 15 April 2012 at 11:23:37 UTC, John Chapman
> wrote:
>> On Sunday, 15
On Monday, 16 April 2012 at 18:48:52 UTC, Xan wrote:
On Sunday, 15 April 2012 at 19:30:27 UTC, Ali Çehreli wrote:
On 04/15/2012 11:39 AM, Xan wrote:
> On Sunday, 15 April 2012 at 11:23:37 UTC, John Chapman wrote:
>> On Sunday, 15 April 2012 at 11:16:43 UTC, Xan wrote:
>>>
>>> int main(string []
On 04/16/2012 11:48 AM, Xan wrote:
On Sunday, 15 April 2012 at 19:30:27 UTC, Ali Çehreli wrote:
On 04/15/2012 11:39 AM, Xan wrote:
> On Sunday, 15 April 2012 at 11:23:37 UTC, John Chapman wrote:
>> On Sunday, 15 April 2012 at 11:16:43 UTC, Xan wrote:
>>>
>>> int main(string [] args)
>>> {
>>> au
On Sunday, 15 April 2012 at 19:30:27 UTC, Ali Çehreli wrote:
On 04/15/2012 11:39 AM, Xan wrote:
> On Sunday, 15 April 2012 at 11:23:37 UTC, John Chapman wrote:
>> On Sunday, 15 April 2012 at 11:16:43 UTC, Xan wrote:
>>>
>>> int main(string [] args)
>>> {
>>> auto alg = Algorisme!(int,int);
>>
>>
On 04/15/2012 01:27 PM, jerro wrote:
- Return 0 from main() for successful exit, anything else by
convention means some sort of error.
Why not just declare main return type to be void?
That's much better. :) D takes care of doing the right thing in that case.
Ali
- Return 0 from main() for successful exit, anything else by
convention means some sort of error.
Why not just declare main return type to be void?
On 04/15/2012 11:39 AM, Xan wrote:
> On Sunday, 15 April 2012 at 11:23:37 UTC, John Chapman wrote:
>> On Sunday, 15 April 2012 at 11:16:43 UTC, Xan wrote:
>>>
>>> int main(string [] args)
>>> {
>>> auto alg = Algorisme!(int,int);
>>
>> Should be:
>> auto alg = new Algorisme!(int, int);
>>
>>> alg.
On Sunday, 15 April 2012 at 11:23:37 UTC, John Chapman wrote:
On Sunday, 15 April 2012 at 11:16:43 UTC, Xan wrote:
int main(string [] args)
{
auto alg = Algorisme!(int,int);
Should be:
auto alg = new Algorisme!(int, int);
alg.nom = "Doblar";
alg.versio = 1;
alg.funcio = (i
On Sunday, 15 April 2012 at 11:16:43 UTC, Xan wrote:
int main(string [] args)
{
auto alg = Algorisme!(int,int);
Should be:
auto alg = new Algorisme!(int, int);
alg.nom = "Doblar";
alg.versio = 1;
alg.funcio = (int a) {return 2*a};
Should be:
alg.funcio = (int a)
hi,
I have this code:
import std.conv, std.stdio, std.stream, std.string;
import std.socket, std.socketstream;
import std.datetime;
class Algorisme(U,V) {
string nom;
uint versio;
V delegate (U) funcio;
}
int main(string [] args)
{
auto alg = Algorisme!(int,int);
alg.nom =
22 matches
Mail list logo