DMD 1.007 release
Hasan Aljudy
hasan.aljudy at gmail.com
Thu Feb 22 13:20:30 PST 2007
Walter Bright wrote:
> Hasan Aljudy wrote:
>> Is there a reason why this shouldn't work?! It seems to me this is the
>> most basic usage for mixin & compile time functions.
>
> Try putting the definition of getstruct() before the mixin.
What about this one?
---------------
dchar[] testd( dchar[] input )
{
if( input[3..5] != "rt" )
{
return input[1..3];
}
return "my";
}
void main()
{
static x = testd( "hello" );
}
----------------
it says:
Error: cannot evaluate testd("hello") at compile time
More information about the Digitalmars-d-announce
mailing list