[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pascal



In article <1f6dxoq.jlfx5k1i1d66sN%dempson@actrix.gen.nz>,
David Empson <dempson@actrix.gen.nz> wrote:
 
> Paul Schlyter <pausch@saaf.se> wrote:
> 
>> In article <68a2ec1b.0201201507.3fa71387@posting.google.com>,
>> Lazarus I. Long <me@lazilong.com> wrote:
>>  
>>> pausch@saaf.se (Paul Schlyter) wrote:
>>>> Do you have these files available too?
>>> 
>>> the only thing in the #include "PasDiskLocSpec.h" is this:
>>> 
>>> typedef RboShort Pas_BlockSpec;
>>  
>> Which raises the question what a Pas_BlockSpec is -- that too wasn't
>> define din the posted code.
> 
> Are you unfamiliar with the C language?  The typedef statement above is
> defining Pas_BlockSpec to be the same type as RboShort.
 
Sorry -- I wasn't paying attention here.  The question is of course
what RboShort is.  A "reverse-byte-order unsigned 16 bit value" is
just too ambiguous - is it an unsigned short, or an array of two
unsigned chars?  The latter would be to preserve endianness over
different architectures.
 
>>> an RboShort is a reverse-byte-order unsigned 16 bit value
>>> (for macintosh it's reverse, on a PC, I don't think it's reverse)
>>  
>> :-) ...you've read Gulliver's Travels, and the war therein between
>> the Big Endians and the Little Endians?
> 
> I agree - defining this as a "little endian 16-bit signed integer" would
> be clearer than "reverse byte order".
 
By saying "reverse byte order" you reveal your own bias here... :-)
 
>>> but in #include "FileSystemTypes.h" there's stuff about the data
>>> structures that reference the actual disk image, there's nothing in
>>> there about Pascal.
>>  
>> I was actually wondering about the definitions of the constants below:
>>  
>>     typedef enum {
>>             Pas_FileKind_UNTYPED, 
>>             Pas_FileKind_X_DISK,
>>             Pas_FileKind_CODE, 
>>             Pas_FileKind_TEXT, 
>>             Pas_FileKind_INFO, 
>>             Pas_FileKind_DATA, 
>>             Pas_FileKind_GRAF, 
>>             Pas_FileKind_FOTO, 
>>             Pas_FileKind_SECURE_DIR, 
>>  
>>             Pas_FileKind_NUMTYPES
>>     } Pas_FileKindType;
> 
> This is an enumerated type, and the constants have not been assigned
> specific values, so the default behaviour applies: the first constant
> (Pas_FileKind_UNTYPED) is zero, and subsequent constants increment by
> one.  This means that Pas_FileKind_NUMTYPES is 9.
 
Again I apologize -- I wasn't paying attention.  Of course youre right!
 
-- 
----------------------------------------------------------------
Paul Schlyter,  Swedish Amateur Astronomer's Society (SAAF)
Grev Turegatan 40,  S-114 38 Stockholm,  SWEDEN
e-mail:  pausch at saaf dot se
WWW:     http://hem.passagen.se/pausch/index.html
         http://home.tiscali.se/~pausch/