Pascal --> C question
Frank Swarbrick
swarbric at tramp.Colorado.EDU
Fri Mar 11 09:16:49 AEST 1988
In article <3352 at psuvax1.psu.edu> schwartz at gondor.cs.psu.edu (Scott Schwartz) writes:
:In article <4940001 at hpiacla.HP.COM> mlight at hpiacla.HP.COM (Mike Light ) writes:
:>> SinWave: packed array[0..255] of char;
:>> char SinWave[256];
:
:>Almost any pascal-ism has an equivalent in C (but not necessarily
:>the other way around).
:
:Except that the useful ones are never that easy. One of my favorites:
: bitstring: packed array[0..1023] of boolean;
:In C you have to do bit-fiddling by hand to get the same effect.
:
How about:
typedef char bool;
bool bitstring[1024];
Or does the "packed" thing in Pascal have some special meaning? I never could
figure out what the difference between a packed array and a regular array was.
Frank Swarbrick (and his cat)
swarbric at tramp.UUCP swarbric at tramp.Colorado.EDU
...!{hao|nbires}!boulder!tramp!swarbric
"Can't help about the shape I'm in.
I can't sing, I ain't pretty, and my legs are thin."
More information about the Comp.lang.c
mailing list