next up previous contents index
Next: CGX Data Records Up: Computer Graphics Exchange (CGX) Previous: CGX Format Identifier   Contents   Index

CGX Data Types

CGX uses the same long (4-byte) and short (2-byte) integer formats as GDSII, and the same 8-byte floating point format. These are the only numerical data types defined.

A date is stored as 8 bytes, as shown in the following table. These are the same numerical fields as used in GDSII, though the format is different (bytes are used where possible, rather than shorts). The third column gives the value in terms of the members of the tm structure from the C library.

short year tm_year + 1900
byte month tm_mon + 1
byte day tm_mday
byte hour tm_hour
byte minute tm_min
byte second tm_sec
byte 0  

Strings are stored in the same manner as in GDSII. The null terminator in not written, however a null byte will be added to strings of odd length, so that record sizes are always even.


next up previous contents index
Next: CGX Data Records Up: Computer Graphics Exchange (CGX) Previous: CGX Format Identifier   Contents   Index
Stephen R. Whiteley 2024-09-29