Thread overview
calling function withouth ()
Jul 25, 2004
Ivan Senji
Jul 25, 2004
Ivan Senji
Jul 25, 2004
Vathix
July 25, 2004
<CODE>
import std.stdio;

int func()
{
 writefln("HAHA");
 return 0;
}

void main ()
{
 func;
 getch();
}
</CODE>

The function isn't actually called but this compiles and runs
but doesn't call func();



July 25, 2004
Funny: :)

This calles the function:

<CODE>
import std.stdio;

int func()
{
 writefln("HAHA");
 return 0;
}

void main ()
{
 func + 0;
 getch();
}
</CODE>

Also for example this works:

-func; //calls the function.


So! We have partial global properties in D? :)


"Ivan Senji" <ivan.senji@public.srce.hr> wrote in message news:ce10fg$2jja$1@digitaldaemon.com...
> <CODE>
> import std.stdio;
>
> int func()
> {
>  writefln("HAHA");
>  return 0;
> }
>
> void main ()
> {
>  func;
>  getch();
> }
> </CODE>
>
> The function isn't actually called but this compiles and runs
> but doesn't call func();
>
>
>


July 25, 2004
"Ivan Senji" <ivan.senji@public.srce.hr> wrote in message news:ce10l5$2jol$1@digitaldaemon.com...
> Funny: :)
>
> This calles the function:
>
> <CODE>
> import std.stdio;
>
> int func()
> {
>  writefln("HAHA");
>  return 0;
> }
>
> void main ()
> {
>  func + 0;
>  getch();
> }
> </CODE>
>
> Also for example this works:
>
> -func; //calls the function.
>
>
> So! We have partial global properties in D? :)
>

The code had to be funny to make it laugh ;)
I think there should be global properties.


July 26, 2004
!!

we DO have global properties!!

import std.c.stdio;
import std.string;

int m_x;

int x(int y) { return m_x=y; }
int x() { return m_x; }

void main()
{
 x=5;
 printf("%d\n",x);
}


July 26, 2004
sorry if my last post came across as angry or patronizing, i was happy and forgot to put in a " :) ".  :)