LG> Anyone know how to read a Pascal data file and convert the file
LG> structure to PB? The first data byte of a string is usually the
Depends on how the string is stored. Some people store as arrays of
char variables to be more compatible with C, some do it with the
packed array of char (aka STRING in Pascal) which does contain the
length, etc. Most people would probably use the packed array of char
since that's Pascal's default string. I tend to use a regular
array of characters, null-terminated at the end if it ends before the
array ends, as it seems more portable.
LG> length of the string, and I'm supposing that numeric variables don't
LG> contain a string length.
Numeric variables, no, do not contain a string length. I can shoot
you the reference on them, but it's all pretty much either one or two
bytes until you start getting into floating point stuff and the types
that often require a coprocessor.
LG> An example would be appreciated.
however, I do NOT have one of those.
... rtfm (314) 843-1855
***
þ Blue Wave/QWK v2.12 þ
--- GEcho/32 1.20/Pro
---------------
* Origin: rtfm 314.843.1855 (1:100/340)
|