[futurebasic] Re: [FB] Give me a constant, any constant

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1999 : Group Archive : Group : All Groups

From: Robert Purves <robert.purves@...>
Date: Mon, 22 Nov 1999 23:36:20 +1300
>    Long ago I noticed that some constant names seem to be used in more than
>one location for more than one purpose.
>
>    For example, the "_size" constant is listed in the FB^3 on-line help
>section eight (8) times.  Each of these listings "says" that _size has a
>different value (36, 70, 22, 284, 4, 8, 0 & 14).

_size is used, not always consistently, in the FB^3 Constants help file to
indicate the length or "size" of a record. Thus in the following, an FsSpec
(known for some reason in FB as FsspecRecord) occupies 70 bytes, and a
MidiclkinfoRecord occupies 8 bytes. Without this information you would not
know how big to DIM one of these records, nor would you know anything about
the last field. For instance the last field of an FsSpec is a Str63 (1
length-byte + 63 characters). Such detailed information is however best
sought elsewhere than in the FB^3 Help.

FsspecRecord
_vrefnum = 0 &00000000
_parid = 2 &00000002
_name = 6 &00000006
_size = 70 &00000046
--- End of record---

MidiclkinfoRecord
_sync = 0 &00000000
_curtime = 2 &00000002
_format = 6 &00000006
_size = 8 &00000008
--- End of record---


Most of these uses of "_size" do not correspond to actual constants in
FB^3. In the current beta version of FB^3, however, there is a predefined
constant _size whose value is 14, derived accidentally I think from the
DateTimeRecRecord, which also has a constant _dateTimeRecsize = 14

HTH,

Robert Purves