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 does... See: http://www.cit.ac.nz/smac/cprogram/c_033.htm For details on the C language's only ternary operator ('?') ---------- Sample use: foo = (0 ? a : c,b) is the same as foo = c -Mysid -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/05/01 PST