bBaseW Field Type Codes

With comparable dBase/xBase codes for reference.

Type codes for bBaseW are increased from single ASCII character to two UTF-16 characters, if needed is right padded with space to be two characters in field descriptor.

Green rows are bBaseW type codes. Light green are lower priority, proposed bBaseW type codes. Gray rows are dBase/xBase types expanded upon for bBaseW. Salmon red marks an unused codes orcodes used for a completely different type.

Type
Code
Type
Name
Database
Version
Field
Size
Comments
Character String
C Character bBaseW Settable,
2 to 512 bytes.
1 to 256 UTF-16 (single WORD) characters.
Strings shorter than field size padded on the right with spaces.
C Character dBase
xBase
Settable,
1 to 253 bytes.
ASCII text < 254 characters long in dBASE.
Only fields <= 100 characters can be indexed.
Integers
IL Long
Integer
bBaseW Fixed,
4 bytes
signed, 32 bit, little endian
IQ Quad
Integer
bBaseW Fixed,
8 bytes
signed, 64 bit, little endian
I Long dBase 7
FoxPro
4 bytes Leftmost bit used to indicate sign, 0 negative.
(code "I", but called "Long" in dBase 7)See IL.
+ Autoincrement bBaseW Fixed,
4 bytes.
Autoincrement, signed, 32 bit, little endian. Starting value set during
table design. Default start is 0, can be started as negative.
+ Autoincrement dBase
xBase
Fixed,
4 bytes
same as IL
N Numeric dBase
xBase
Settable, up
to 18 bytes.
ASCII text up till 18 digits, with sign and decimal
point). Valid characters: "0" - "9" and "-". Number fields can be
up to 20 characters long in FoxPro and Clipper.
O Double dBase
xBase
Fixed,
8 bytes
(As in double long? Binary assumed.) Not needed, see IQ
Floating Point
FX Extended
Floating Point
bBaseW Fixed,
10 Byte
IEEE 754 Extended Double precision.
FQ Quad
Floating Point
bBaseW
(proposed)
Fixed,
16 byte
(will require 64 bit CPU and compiler)
F Floating Point dBase
xBase
Fixed,
20 bytes
minus, decimal and upto 18 ASCII digits
(depreciated for bBaseW)
Currency (Fixed Decimal Number)
(¤ is "unspecified currency" character, on number pad Alt 0164.)
¤4 Currency bBaseW 8 bytes Signed, 64 bit, integer count of 1/10000ths.
(called CURRENCY type variable)
Up to 14 digits, decimal point and 0 to 4 digits when entering.
¤2 Extended
Currency
Signed, 64 bit, integer count of 1/100ths.
(called CURRENCYEX type variable integral part is extended
Y Currency FoxPro ? ?
Date and Time
@W DateTime
(Windows
format.)
bBaseW Fixed,
8 bytes.
Is Windows® Filetime format. Epoch 1 January 1601.
count of 100ns. (is post Gregorian)
@U DateTime
Unix
format
Modified Unix® Timestamp. Epoch 1 Janury 1970, UTC time.
32 bit Unix timestamp put in 64 bits and multiplied
by 10^7, hundreds of nano then added.
The modification avoids January 19, 2038 overflow and adds fractions
of seconds. (is very post Gregorian)
@ Timestamp dBase
xBase
Fixed,
8 bytes
(2 longs)
First long represents date and second long time. Date is the number
of days since 1 January 4713 BCE. Time is:
(hours * 3600000) + (minutes * 60000) + (seconds * 1000).
Dates before 15 October 1582 are pre-Gregorian, not acounting for leap
years nor the 10 day adjustment. Also, multiple other calendars, with
different adjustments, in different geographic areas, from 4713 BCE
to 1582. Is the time local or UTC? Local would make sharing data
time zones more difficult. Seconds are multiplied by 1000, but no
mention of adding miliseconds.
D Date bBaseW Fixed,
4 bytes
WORD for year, BYTE for month and BYTE for day.
4 bytes saved over xBase.
D Date dBase
xBase
Fixed,
8 bytes.
Date stored as an ASCII string in the format YYYYMMDD.
T Time bBaseW Fixed,
3 bytes.
1 byte for hours, 1 byte for minutes and 1 byte for seconds.
T DateTime FoxPro Fixed,
8 bytes
The first 4 bytes are a 32-bit little-endian integer representation of the
Julian date, where Oct. 15, 1582 = 2299161 per (a dead link). The
last 4 bytes are a 32-bit little-endian integer time of day
represented as milliseconds since midnight.
It mentions 1582, but the 2299161 puts the epoch more than 6200 years
pre-Gregorian.
Miscellaneous Types
L Logical bBaseW Fixed,
4 bytes
A C/C++ structure or PowerBASIC UDT (User Defined Type). Each of the
32 bits may be set for True or reset for False.
L Logical dBase VII
xBase
Fixed,
1 byte
Initialized to 0x20 (space) otherwise T or F. In older versions may
?, Y, y, N, n, F, f, T, t. Always displayed as T, F or?.
(note: takes entire byte for one T/F state.)
M Memo bBaseW
(definitely
planned)
Fixed,
8 bytes
The 8 bytes are the location of memo in memo file (.dbm vs. .dbt)
(note: 1st 4 bytes in memo are record number the memo is for, to
used for deletion of a record and associated memo then compaction;
next 4 bytes are string(text) length part of the memo in bytes.
followed by the memo.
M Memo dBase
xBase
Fixed,
10 bytes
10 ASCII digits representing a .DBT block number. The number is
stored as a string, right justified and padded with blanks.
GB Graphic
Bitmap
bBaseW
lower
priority
Fixed,
8 bytes
See M comments. Format is DIB. (.dbb file extention?)
(note: First 4 bytes are record number, second 4 are DIB size.
first 4 bytes of DIB is X dimension, second four are Y dimension,
these are included in DIB size.)
GI Graphic
Image
bBaseW
possible
?? .bmp, .jpg, .png Maybe guts of those type files, or
file path/name. View from bBaseW or shell to MS Paint??
ΔΞ RecStat bBaseW WORD Record status flags
bit 15 is 0 for deleted record

Created on 08 August 2023