digitalmars.D.bugs - calling function withouth ()
-
Ivan Senji
(15/15)
Jul 25 2004
- Ivan Senji (20/35) Jul 25 2004 Funny: :)
- Vathix (4/22) Jul 25 2004 The code had to be funny to make it laugh ;)
- Jarrett Billingsley (12/12) Jul 25 2004 !!
- Jarrett Billingsley (2/2) Jul 25 2004 sorry if my last post came across as angry or patronizing, i was happy a...
<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();
Jul 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();
Jul 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.
Jul 25 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); }
Jul 25 2004
sorry if my last post came across as angry or patronizing, i was happy and forgot to put in a " :) ". :)
Jul 25 2004