View Single Post
  #44  
Old 02-13-2010, 12:55 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by WhiteDragon View Post
Although that may be valid syntax (can't check right now), I don't see how that would run the function. My guess is that it would just execute:
Storing the function in a temp.suckawhat, which would evaluate to 0(?), then 0 would be stored in temp.example.

If that actually works I may have to hurt someone though since it literally makes no sense.
The engine replaces inline function definitions with a function pointer (e.g., "function_1"). The return value of assignment should be the rvalue, so temp.f = function_1 returns that pointer. It's no mystery why it works. The mystery is why it doesn't work the way one would want it to.

Probably has something to do with the way normal function are declared.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/

Last edited by Tolnaftate2004; 02-13-2010 at 12:57 AM.. Reason: Bad word choice.
Reply With Quote