cobol语言COMP,COMP-1,COMP-2,COMP-3,COMP-5谁给具体解释下

来源:百度知道 编辑:UC知道 时间:2024/07/04 01:06:43
最好举点例子

压缩型数据,位数、符号位不同。具体如下:
COMPUTATIONAL or COMP (binary) This is the equivalent of BINARY. The COMPUTATIONAL phrase is synonymous with BINARY.
COMPUTATIONAL-1 or COMP-1 (floating-point) Specified for internal floating-point items (single precision). COMP-1 items are 4 bytes long.
COMPUTATIONAL-2 or COMP-2 (long floating-point) Specified for internal floating-point items (double precision). COMP-2 items are 8 bytes long.
COMPUTATIONAL-3 or COMP-3 (internal decimal) This is the equivalent of PACKED-DECIMAL.
COMPUTATIONAL-4 or COMP-4 (binary) This is the equivalent of BINARY. COMPUTATIONAL-5 or COMP-5 (native binary) These data items are represented in storage as binary data. The data items can contain values up to the capacity of the native binary representation (2, 4 or 8 bytes), rather than being limited to the value implied by the number of nines in the picture for the item (as is the case for USAGE BINARY data). When numeric data is moved or stored into a C