Language and Conventions Overview | Data Types


数值数据

数值数据包括常量和变量。在GRIP数值常量可能不包含空格,必须完全包含在程序的一个行。

数值常量可能有以下两种格式之一:

  1. mantissa

  2. mantissa E (exponent)

注意:不支持READ语句指数数值格式。

尾数

尾数是一个数字组成的一个数字或更多(0至9)组成。这个数字可以包括一个小数点,并且也可以由一个前缀+或 - 符号(如果没有就表示一个正数)。有效的数字的尾数的最大数量是15。

指数(E)

The exponent (E) represents the power to which the number ten is to be raised. The exponent may contain a maximum of two digits and may also be prefixed by a + or - sign (if no sign exists a positive number is assumed). The approximate range of the exponent is from -79 to +75.

The resulting value can be thought of as:

(numerical constant = mantissa times ten to the power of "E").

The approximate magnitude of a numerical constant ranges from:

(5.4 * 10-79 to 7.2 * 1075).

例子

The following values are shown raised to an exponent with their equivalent, non-exponential values.

With Exponents

Without Exponents

.123456789E9

123456789.

.05E-2

.0005

+5E+02

500.

.005E3

5.


Copyright ©2015 胡君NX二次开发官网(www.UGapi.com) QQ:85585969 All Rights Reserved.