Add a field to the data definition structure dd. The field will be called name and have the named type. If the field type is not variable then n specifies the number of elements that can be stored in the field. If it is variable then n specifies a default amount of storage to allocate. This will be increased as needed. Nonnull should be 1 if null values are not allowed. (Note: currently Texis does not allow NULL values at all, and this flag will be silently ignored).
The available types are listed in table here. The columns have the following meanings.
|byte||Raw binary data||FTN_BYTE||BYTE|
|double||Double precision floating point||FTN_DOUBLE||DOUBLE|
|date||Unix date stored as time_t||FTN_DATE||DATE|
|float||Single precision floating point||FTN_FLOAT||FLOAT|
|int||32-bit signed integer||FTN_INT||--|
|integer||32-bit signed integer||FTN_INTEGER||--|
|long||32-bit signed integer||FTN_LONG||INTEGER|
|short||16-bit signed integer||FTN_SHORT||--|
|smallint||16-bit signed integer||FTN_SMALLINT||SMALLINT|
|word||16-bit unsigned integer||FTN_WORD||UNSIGNED SMALLINT|
|ind||Pointer to external file||FTN_INDIRECT||INDIRECT|
|dword||32-bit unsigned integer||FTN_DWORD||UNSIGNED INTEGER|
|int64||64-bit signed integer||FTN_INT64||INT64|
|uint64||64-bit unsigned integer||FTN_UINT64||UINT64|
|counter||Unique serial number||FTN_COUNTER||COUNTER|
|strlst||A list of strings||FTN_STRLST||STRLST|
|recid||A record ID||FTN_RECID||--|
All the type names can take an optional prefix of var which indicates that there will be a variable number of items. The ones directly supported by Texis are varchar and varbyte.
The types which almost always will have a var prefix are ind and strlst. If you do not specify var for these types you must make sure there is enough space to hold the longest filename and string list respectively. Both of these have an element size of one.
Returns 0 on error and 1 on success.