Re: [NEWBIE] question

From: Mysidia (
Date: 04/03/01

On Tue, 3 Apr 2001, Edward Felch wrote:

> I hate to ask a basic c question, but how does the ? in: GET_POS(ch) ==
   That's exactly what you're doing here.
> POS_SITTING ? "sitting" : "resting"  work? Thanks a lot... ive been
> wondering

   How do you purport to understand any of that if you don't understand
something so basic as the ternary (conditional) operator?

   Structured programming isn't something you can go about in a haphazard
way like that, definitely not in a safe manner, you need to understand the
general syntax of the _entire_ language before you attempt to seriously
look at a real program, at least one bearing the complexity that CircleMUD

For details on the C language's only ternary operator ('?')

    Sample use:

    foo = (0 ? a : c,b)

    is the same as foo = c


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/05/01 PST