beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 149

background image

MVI56-BAS ♦ ControlLogix Platform

BASIC CALLs Syntax

BASIC Module (DB/BAS Compatible)

User Manual

ProSoft Technology, Inc.

Page 149 of 234

December 13, 2011

CALL 62: Converting from Numeric Format to String Format

CALL 62 converts a numeric value to string format:

PUSH [A]
PUSH [B]
CALL 62

Where:
A = numerical variable to be converted to string format.
B = string number that A will be converted to

Example:

Ready
>list
10 STRING 100, 14
20 INPUT "Enter a number to convert to a string ", N
30 PUSH N, 1: CALL 62
40 PRINT $ ( 1)
50 END
Ready
>run
Enter a number to convert to a string 1.23
1.23
Ready
>