Mitsubishi QD51 Programming Manual page 325

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
OCT$
Function
• Converts a numeric value into a character string variable in octal notation.
OCT$ (<numeric expression>)
Syntax
numerical expression
PRINT OCT$(10)
Examples
• The OCT$ function converts a numeric value to a character string variable in octal notation.
Description
• Digits after the decimal point are truncated if a decimal point is included in the value in
<numeric expression>.
• Octal and decimal correspond as follows.
Program Example
10 ' Converts a decimal number to an octal number
20 A=100
30 A$=OCT$(A)
40 PRINT "Decimal number=";A
50 PRINT "Octal number=";A$
60 END
RUN
Decimal number=100
Octal number=144
OK
11 - 155
OCTal $
Octal
0
Decimal
0
• • • •
Specify a value within the range between -32768 and
65535.
Note that numbers from 32768 to 65535 are the
same as the values from -32768 to -1 (8000
FFFF
).
H
• • • •
Converts decimal number 10 into octal and displays
the result.
1
2
3
4
1
2
3
4
:
'Defines a value
:
'Converts into an octal number
MELSEC-Q
5
6
7
10
5
6
7
8
to
H
11
12
9
10
11 - 155

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents