[nycbug-talk] invalid type argument of '->'

Marc Spitzer mspitzer at gmail.com
Fri Mar 21 21:30:18 EDT 2008


On Fri, Mar 21, 2008 at 4:41 PM, Tim A. <techneck at goldenpath.org> wrote:
>  C's macro preprocessor is not complicated, the above translates to:
>
> if the thing ZTS is defined, somewhere above "#define ZTS 'something'
> " was encountered do the first half otherwise do the second half.
>
>  The logic was straight forward. "define" is obviously a command.
>  But the (I guess you'd call them "identifiers"?) didn't make any sense to
> me:
>  SPL_G(v) TSRMG(spl_globals_id, zend_spl_globals *, v)
>
> SPL_G(v) (spl_globals.v)
>

One hint if something is all in CAPS it is generally a macro

>
>
>  And if you want to do C and don't already have it get the current version
> of K&R. By do I mean put a chunk of text in the output file, as cpp
> handles all the #commands and macro substitution.
>
>
>  That is a book I should have read long time ago.
>  College deluded me into thinking C was antiquated and C++ was all I needed
> and that if *that* ever failed to be the case, Java would be the answer.
>  Hacking stuff indicated Assembly was where you could really take command of
> the machine.
>  Assembly is very cool, but a weeee bit a PITA.
>  Taking another look at C makes me think C++ might be good at that higher
> level code management, but it abstracted away the depth of manipulation (and
> a deeper understanding) it looks like C is made for.
>

This is important C is not a subset of C++ there are differences here.
 And the difference is growing over time.

marc


-- 
Freedom is nothing but a chance to be better.
Albert Camus



More information about the talk mailing list