Re: [NEWBIE] question

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 04/04/01


"Daniel A. Koepke" wrote:
>
> On Tue, 3 Apr 2001, Peter Ajamian wrote:
>
> > Close, but not quite.
>
> I believe he meant it was _like_ that statement.

That could be, though his later reply doesn't seem to support that.  At
any rate, I felt that clarification was warranted, since, if I
misconstrued what he said, then others might as well.

>   (1 ? printf("true\n") : printf("false\n"));
>
> is perfectly valid code.  Not that I'd recommend ever doing that.

Yep, there are a few instances when something like that comes in handy,
such as when writing macros.  And as long as we're on the subject of
virtually meaningless C cosing facts (heh, just couldn't resist this one,
I picked it up from the comp.lang.c FAQ) did you know that the following
is also perfectly valid C?...

int array[10]={0,1,2,3,4,5,6,7,8,9};

printf("%d\n", 5[array]);

The reason this works is because 5[array] is translated into *(5 +
array).  Perfectly useless information, but interesting none-the-less and
gives some insight to the internal workings of the language.

<ObCircle>

Errr, ummm, *tries to think something up*, oh yeah, I know...

Anyone want to comment on this one?  ASCII vs. binary pfiles.  I am
probably in the minority, but I tend to prefer binary because (AFAIK)
they load in faster and easier (no parsing necessary).  Also, there is a
space consideration with ASCII which takes up lots more room plus wastes
more space by storing each player's data in a seperate file (thus taking
up directory space and wasted space to fill to the sector boundry on
disk).

Thoughts, comments, ideas, drug of chioce for staying up all night (or
suggestions on how to fine-tune the caffine drip in one's IV)?

Regards, Peter

--
   +---------------------------------------------------------------+
   | 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