Appendix S (Data Entry). DORIC 9.65, INFO-Text software
Mainos
Mainos
Appendix S
Data Entry
DATA ENTRY
Scientific
Notation
To enter a value into INFO, type the value or command and press <RETURN>. INFO interprets the values you enter accordingly: n
Character data entered as character strings.
n
Numeric data entered as numeric constants. Can be regular numbers per data type, or entered in scientific notation. Always interpreted as the numeric value the entry represents. Numbers greater than 1,000 can include commas (see below).
n
Dates entered as mm/dd/yyyy or fewer characters or in military format as mmm-dd. Always stored as
YYYYMMDD (see below).
INFO accepts numeric values expressed in scientific notation. INFO stores the value in that item's internal storage format. The entered term must fit within the item's output width. The value (not the length of the term expressed in scientific notation) must fit the item's internal width. Scientific notation is an alternate way of displaying a value, not an alternative storage format. Any numeric value except a date can be entered in scientific notation.
When INFO displays or prints a numeric value, if the item's output width does not permit display of the entire value, INFO attempts to display the value in scientific notation.
A value in scientific notation consists of a real number and a power of ten by which the real number is multiplied.
Values expressed in scientific notation appear in this syntax:
+#E+NN
-D-
Where # is the real number and NN is the power of ten by which it is multiplied: E and D are synonymous
A + or - sign preceding the numeric value is optional. If the sign is omitted, INFO assumes a positive value.
INFO Reference Manual Appendices A-157
Data Entry
Appendix S
Comma Use
The value # must be at least one digit long, and cannot be longer than sixteen significant figures. The value of # can include a decimal point. If # is one digit, this digit can either precede or follow the decimal point. The number of digits in n may range up to the maximum places for which the field is specified.
An exponent consists of the letter E, a + or - sign, and two digits NN. A leading 0 is required if the exponent is less than 10. The exponent can range from -99 to +99.
D can be specified instead of an E as it is used with some other languages (notably BASIC).
The examples below show the expression of values in regular and scientific notation:
.00000141 1.41E-06
4,236,000 +4.236E+06
The number -28,900,000,000,000,000,000,000,000,000 can be expressed as a BASIC double-precision number:
-2.89D+28
Since INFO stores the values in the internal form, INFO considers 4236E+03 to be the same as 4.236E+06.
You can express values using scientific notation at any point in an INFO session that you express values as numeric constants. The minimum output width for an item to express a value in scientific notation is five.
INFO accepts and displays commas as part of numeric values under the following circumstances: n
Comma (,) is not the current delimiter character. To set the delimiter character, see the DELIMITER command.
n
The system item $COMMA-SWITCH does not have the value of -1.
If $COMMA-SWITCH is set to 0, its default value, INFO displays commas where there is space. If the output width is sufficiently larger than the internal width of a given datafile item or system variable to include the added spaces required by commas, INFO displays the commas.
A-158 Appendices INFO Reference Manual
Appendix S
Data Entry
Date Formats
Date Output Displays
As long as there is sufficient space in the output width of the item, INFO accepts data that includes commas.
INFO stores dates in the format of YYYYMMDD. The internal width of a D-type item is always 8 bytes. The output width of a D-type item can vary. The table below shows the effect of different date output widths on the same date:
Date Displayed
12/24/1996
12/24/96
12/24
12
Output Width
10
8
5
2
INFO accepts dates in the format determined by the current DFMT setting. You can also change the date separator character from its default character / (slash).
If the setting is MDY, the setting can include the M option for the date format of mmm-dd-yyyy, where mmm is the first three letters of the month. For example, 01/12/96 is expressed as JAN-15-1996.
INFO Reference Manual Appendices A-159
Lataa
Mainos