HTBasic Help
×
Menu
Index

ENTER USING Examples

 
The following examples demonstrate how the ENTER USING rules are used to input floating point and integer numbers.
 
DIM A$[22]
A$="Dollars: $34.56 Total"
ENTER A$ USING "K";X1
ENTER A$ USING "14D";X2
 
In the first ENTER statement, the number builder ignores non-numeric characters preceding the number and stops at the first character that is not part of the number so that X1 equals 34.56. In the second ENTER statement, the number builder stops after 14 characters of "Dollars: $34.5" are input, so, X2 equals 34.5.
 
A$ = "2XX+3Y"
ENTER A$ USING "D,5D";X,Y
 
In this example, the variable X is assigned the value 2, and Y is assigned 3.