Hi ,
I have seen this paragraph in the GW-Basic manual :
"Creating and accessing random access files
requires more program steps than with sequen-
tial files, but there are advantages to using ran-
dom access files. One advantage is that random
access files require less room on the disk,
because GWBASIC stores them in a packed
binary format. "
Does anybody know where I can get more information about the format of this 'packed
binary format'?
Thank you,
Raul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think the paragraph is a little bit misleading because it's not GWBASIC that stores numeric values in packed binary format in random access files but the programmer does. The programmer could also choose to save numeric values as text in random access files.
The conversion functions are CVI, CVS, CVD, MKI$, MKS$, and MKD$. One could argue ASC and CHR$ belong also in this category, for converting single bytes. Integers are stored as lilttle endian two's complement. The single and double precision floats use the „Microsoft Binary Format“ (MBF) as described in the PC-BASIC manual: http://robhagemans.github.io/pcbasic/doc/2.0/#mbf
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi ,
I have seen this paragraph in the GW-Basic manual :
"Creating and accessing random access files
requires more program steps than with sequen-
tial files, but there are advantages to using ran-
dom access files. One advantage is that random
access files require less room on the disk,
because GWBASIC stores them in a packed
binary format. "
Does anybody know where I can get more information about the format of this 'packed
binary format'?
Thank you,
Raul
I think the paragraph is a little bit misleading because it's not GWBASIC that stores numeric values in packed binary format in random access files but the programmer does. The programmer could also choose to save numeric values as text in random access files.
The conversion functions are CVI, CVS, CVD, MKI$, MKS$, and MKD$. One could argue ASC and CHR$ belong also in this category, for converting single bytes. Integers are stored as lilttle endian two's complement. The single and double precision floats use the „Microsoft Binary Format“ (MBF) as described in the PC-BASIC manual: http://robhagemans.github.io/pcbasic/doc/2.0/#mbf