!TYPES.DEF [115] - Standard A-Shell data types !-------------------.-------------------.-------------------.-------------------. !EDIT HISTORY ! Note: history reformatted 9-Feb-17 ! [115] 04-Jan-22 / jdm / Add T_MM'DD'YY, T_DD'MM'YY ! [114] 21-Jun-21 / jdm / Add T_RECNO, group the types ! [113] 31-May-21 / jdm / Add T_CURRENCY_xxx ! [112] 18-May-21 / jdm / Add T_SQL_DATE, T_SQL_DATETIME, T_SQL_TIME ! [111] 16-May-21 / jdm / Add T_SYSTIME_B3, T_SHORT, T_USHORT, T_TINY, T_UTINY ! [110] 19-Apr-21 / jdm / Add T_CCYY ! [109] 09-Mar-21 / jdm / Add T_YNxxx ! [108] 10-Feb-21 / jdm / Add T_ISO3_COUNTRY, T_ISO2_US ! [107] 08-Nov-20 / jdm / Add T_MMDDYY, T_DDYYMM, T_YYMMDD, T_CCYYMMDD ! [106] 13-Oct-19 / jdm / Add T_JULIANY2K ! [105] 23-May-19 / jdm / Add T_AMOSPATH, T_AMOSFILE, T_AMOSEXT ! [104] 03-Oct-18 / jdm / Add T_FILETIME, chg SDATE,STIME to SYSDATE,SYSTIME ! [103] 26-Sep-18 / jdm / Add T_DYN_NAME, T_DEFTYP, T_FN_NAME ! [102] 29-Aug-16 / jdm / Add T_BITFLAGS48, T_BITFLAGS16, T_SOCKET, T_INT, ! T_UINT, T_HOSTNAME etc ! [101] 23-Oct-14 / jdm / Add T_NATIVEPATH, T_BITFLAGS32, T_RGB ! [100] 29-Sep-14 / jdm / Created !-------------------.-------------------.-------------------.-------------------. !NOTES ! The DEFTYPE facility was implemented in compiler edit 710 (6.1.1392) ! ! Because these type names could conflict with existing variables or ! symbols, we'll adopt the convention of prepending "T_" to them. ! (BOOLEAN will be treated as a special case, since it is so commonly ! defined as such in other languages.) !-------------------.-------------------.-------------------.-------------------. ++ifdef COMPILER_VERSION ! Introduced in 711, just after deftype ! logic... deftype BOOLEAN = i,2 ! standard boolean (use with .TRUE, .FALSE) deftype T_BOOLEAN = BOOLEAN ! alternate name ! bit flags... deftype T_BITFLAGS16 = b,2 ! standard block of 16 bit flags deftype T_BITFLAGS32 = b,4 ! standard block of 32 bit flags deftype T_BITFLAGS48 = b,6 ! extended block of 48 bit flags ! integers... deftype T_INT = i,4 ! general 32 bit int (note 2301 byte order though!) deftype T_UINT = b,4 ! general 32 bit unsigned int (LSB) deftype T_SHORT = i,2 ! [111] general 16 bit signed int (LSB) deftype T_USHORT = b,2 ! [111] general 16 bit unsigned int (LSB) deftype T_TINY = i,1 ! [111] general 8 bit int deftype T_UTINY = b,1 ! [111] general 8 bit unsigned int ! date/time ... deftype T_SYSDATE = b,4 ! system separated date (mon,day,yr,dow each 1 byte) (DATE keyword, ODTIM) deftype T_SYSTIME_B3 = b,3 ! [111] seconds since midnight (same as TIME keyword; see ODTIM) deftype T_SYSTIME = b,4 ! seconds since midnight (same as TIME keyword; see ODTIM) deftype T_FILETIME = B,4 ! seconds since 'epoch' (midnight 1 Jan 1970) deftype T_MMDDYY = S,6 ! [107] MMDDYY deftype T_DDMMYY = S,6 ! [107] DDMMYY deftype T_YYMMDD = S,6 ! [107] YYMMDD deftype T_CCYYMMDD = S,8 ! [107] CCYYMMDD deftype T_MM'DD'YY = S,8 ! [115] MM/DD/YY deftype T_DD'MM'YY = S,8 ! [115] DD/MM/YY deftype T_CCYY = S,4 ! [110] CCYY deftype T_JULIANY2K = B,2 ! [106] days since 1/1/2000 ++ifndef T_SQL_DATETIME ! [112] deftype T_SQL_DATETIME= S,23 ! [112] CCYY-MM-DD hh:mm:ss.ttt deftype T_SQL_DATE = S,10 ! [112] CCYY-MM-DD deftype T_SQL_TIME = S,12 ! [112] hh:mm:ss.ttt ++endif ! files... deftype T_NATIVEPATH = s,260 ! string holding a native path (up to max len) deftype T_AMOSPATH = S,100 ! [105] max AMOS-style path (dev,unit,file,ext,ppn) deftype T_AMOSFILE = S,72 ! [105] max AMOS-style filename deftype T_AMOSEXT = S,8 ! [105] max AMOS-style ext deftype T_RECNO = F,6 ! [114] record # variable type ! yes/no deftype T_YN = S,1 ! [109] Y/N no other possibility deftype T_YNX = S,1 ! [109] Y/N/other (no default) deftype T_YNN = S,1 ! [109] Y/N default N deftype T_YNY = S,1 ! [109] Y/N default Y ! [113] variations of monetary amounts; suffix is total significant digits, # past decimal pt deftype T_MONEY_16_2 = F,8 ! [113] ##############.## deftype T_MONEY_11_2 = F,6 ! [113] #########.## ! misc... deftype T_HOSTNAME = s,254 ! hostname with optional :port deftype T_PORT = b,2 ! TCP port (0-65535) deftype T_DYN_NAME = S,64 ! dynstruct struct and field names deftype T_DEFTYP = S,64 ! type used to store name a DEFTYPE name (used as a data dictionary id) deftype T_FN_NAME = S,90 ! used to store the name of a function deftype T_ISO3_COUNTRY= S,3 ! [108] ISO3 codes for countries deftype T_ISO2_US = S,2 ! [108] ISO2 codes for US States deftype T_RGB = b,4 ! rgb color def deftype T_SOCKET = i,4 ! TCP socket (allows neg for errors) ++endif