ProSoft Technology MVI56-BAS User Manual
Page 150

BASIC CALLs Syntax
MVI56-BAS ♦ ControlLogix Platform
User Manual
BASIC Module (DB/BAS Compatible)
Page 150 of 234
ProSoft Technology, Inc.
December 13, 2011
CALL 63: Converting from String Format to Numeric Format
CALL 63 converts a string to the numeric format:
PUSH [A]
CALL 63
POP [B]
POP [C]
Where:
A = string number to be converted containing a decimal number [0..255]
B = status (0 = no valid number found , not 0 = valid decimal number found on A)
C = string A converted to numeric value
Example:
Ready
>list
10 STRING 100, 20
20 INPUT "Input a string to convert: ", $ ( 1)
30 PUSH 1: CALL 63: POP V, N
40 IF ( V <> 0) THEN PRINT $ ( 1), " ", N: GOTO 60 ""
50 PRINT "Invalid or no value found"
60 GOTO 20
Ready
>run
Input a string to convert: 1.23Hello
1.23Hello 1.23
Input a string to convert: 456World
456World 456
Input a string to convert: ^
^C struck!
- in line 30
Ready
>