delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/22/17:05:35

From: Damian Yerrick <MYNAMEISd_yerrick AT hotmail DOT comNO2CANNEDHAM>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Length of Chars...
Organization: Pin Eight Software <http://pineight.8m.com/>
Message-ID: <q72k8s8heuhu5c7198uioge8lc8kobjht8@4ax.com>
References: <3888ED7B DOT DF52FEB2 AT ou DOT edu> <38896068 DOT 8C5927C0 AT is DOT elta DOT co DOT il> <388A0530 DOT DF2B2F31 AT ou DOT edu>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 31
X-Trace: /bdhN5dZYngxvXwvycsSlrDWnXPyLtxHPonR9eCJT9VwhQ8Gbp0iRHcssHVlIncPzfaS1UdUs0LR!+lOcSWFMk02mdJFIQLwGMdlYJoHSehTxuw/YNhDr0X0i3wo4eQLq4PNE5TZtTNle0OBhYonjrg==
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Sat, 22 Jan 2000 19:51:33 GMT
Distribution: world
Date: Sat, 22 Jan 2000 19:51:33 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Sat, 22 Jan 2000 13:29:52 -0600, David Cleaver <davidis AT ou DOT edu>
wrote:

>However, if the char type ever increases in size, my tables
>wouldn't be as tighly packed as possible, so I wanted to
>know if it was ever going to change.

The .txt file format specification depends on a one-byte 'char' type;
I don't see it changing soon.

>what did you mean by using the "fastest data type" in a for loop? 

'int' is implementation defined, and it generally means "the native
word size of the architecture."

>Also, is it ok to store unsigned chars in hex form?  I'll give an
>example below:
>
>unsigned char array1[3][3] = {{0x2a, 0xf4, 0x08},
>                              {0x96, 0xa5, 0x7c},
>                              {0x8e, 0x59, 0x8b});
>
>Is this ok

Yes. Hex numbers are just like any other integers. To the compiler.
0x41 == 65 == 'A'

-- 
Damian Yerrick  http://yerricde.tripod.com/
View full sig at http://www.rose-hulman.edu/~yerricde/sig.html
Comment on story ideas at http://home1.gte.net/frodo/quickjot.html

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019