1 DATA The DATA statement creates a data block for the READ statement. Example DATA 35,32.3,PRODUCTION SEQUENCE,"SYSTEM","1,2" 2 Syntax [ num-lit ] DATA [ str-lit ],... [ unq-str ] Status: 200 OK Content-Type: text/plain; charset=ISO-8859-1 Last-Modified: Mon, 23 Oct 2000 06:15:19 GMT Script-Control: X-stream-mode=1 1 Data_types All data in a BASIC program have a specific data type that determines how many bits of storage should be considered as a unit and how the unit is to be interpreted and manipulated. BASIC recognizes five primary data types: integer, floating-point, character string, packed decimal, and RFA. These data types correspond to the INTEGER, REAL, STRING, DECIMAL(d,s), and RFA keywords. You can specify the default type and size of numeric data with qualifier keywords or the OPTION statement. You can also explicitly declare the data types of variables and constants with declarative statements. 2 INTEGER Integer data are stored as binary values in a byte, a word, or a longword. These values correspond to the BYTE, WORD, and LONG data type keywords. Keyword Range BYTE (8-bit) -128 to 127 WORD (16-bit) -32768 to 32767 LONG (32-bit) -2147483648 to 2147483647 When used in declarative statements, the INTEGER keyword specifies integer data of the default integer size. 2 REAL Floating-point values are stored using a signed exponent and a binary fraction. BASIC allows four floating-point formats: single, double, gfloat, and hfloat. These formats correspond to the SINGLE, DOUBLE, GFLOAT, and HFLOAT keywords. Keyword Range Precision SINGLE (32-bit) .29 * 10^-38 to 1.7 * 10^38 6 digits DOUBLE (64-bit) .29 * 10^-38 to 1.7 * 10^38 16 digits GFLOAT (64-bit) .56 * 10^-308 to .90 * 10^308 15 digits HFLOAT (128-bit) .84 * 10^-4932 to .59 * 10^4932 33 digits In declarative statements, the REAL keyword specifies floating-point data of the default floating-point size. 2 DECIMAL The DECIMAL(d,s) data type keyword specifies packed decimal data. A packed decimal value has a specified number of digits (d) and a specified decimal point position (s). 2 RFA The RFA data type keyword specifies a Record File Address (RFA). An RFA uniquely specifies a record in a file. You can access RMS files of any organization by Record File Address (RFA). The RFA data type is unique and can be used only for: o RFA operations (with the GETRFA function and GET and FIND statements) o Assignments to other variables of the RFA data type o Comparisons with other variables of the RFA data type using the equal to (=) or not equal to (<>) relational operators o Formal and actual parameters o DEF and function results The RFA data type requires six bytes of storage. 2 STRING The STRING data type keyword specifies character string data. Each character is stored in one byte.