
5
CONTENTS
Converting word (signed), double word (signed) type to double word (unsigned)/32-bit string type. . . . . . . . . . 47
Converting word (signed), double word (signed) type to BCD type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Converting word (signed), double word (signed) type to time type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Converting single-precision real type to word (signed), double word (signed) type . . . . . . . . . . . . . . . . . . . . . . 54
Converting double-precision real type to word (signed), double word (signed) type. . . . . . . . . . . . . . . . . . . . . . 56
Converting single-precision real type to double-precision real type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Converting double-precision real type to single-precision real type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Converting single-precision real type to string type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Converting word (unsigned)/16-bit string, double word (unsigned)/32-bit string type to bit type. . . . . . . . . . . . . 65
Converting word (unsigned)/16-bit string type to word (signed), double word (signed) type. . . . . . . . . . . . . . . . 67
Converting double word (unsigned)/32-bit string type to word (signed), double word (signed) type. . . . . . . . . . 69
Converting word (unsigned)/16-bit string type to double word (unsigned)/32-bit string type. . . . . . . . . . . . . . . . 71
Converting double word (unsigned)/32-bit string type to word (unsigned)/16-bit string type. . . . . . . . . . . . . . . . 73
Converting word (unsigned)/16-bit string, double word (unsigned)/32-bit string type to string type . . . . . . . . . . 75
Converting word (unsigned)/16-bit string, double word (unsigned)/32-bit string type to time type . . . . . . . . . . . 77
Converting string type to bit type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Converting string type to word (signed), double word (signed) type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Converting string type to single-precision real type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Converting string type to word (unsigned)/16-bit string, double word (unsigned)/32-bit string type . . . . . . . . . . 88
Converting string type to time type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Converting string type to BCD type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Converting BCD type to word (signed), double word (signed) type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Converting BCD type to string type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Converting time type to bit type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Converting time type to word (signed), double word (signed) type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Converting time type to string type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Converting time type to word (unsigned)/16-bit string, double word (unsigned)/32-bit string type . . . . . . . . . . 107
Converting bit array to word (signed) type, word (unsigned)/16-bit string type, double word (signed) type,
double word (unsigned)/32-bit string type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Converting word (signed) type, word (unsigned)/16-bit string type, double word (signed) type,
double word (unsigned)/32-bit string type to bit array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Bit array copy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Specified bit read of word (signed) type data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Specified bit write of word (signed) type data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Specified bit copy of word (signed) type data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Nonessential type conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
5.2 Standard Functions of One Numeric Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Absolute value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
5.3 Standard Arithmetic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Remainder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Exponentiation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Move operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
5.4 Standard Bitwise Boolean Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Boolean AND, boolean OR, boolean exclusive OR, and boolean NOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
5.5 Standard Selection Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Maximum/Minimum selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146