How to convert a string to a numerical variable (Program Bug and Problems)

by Amos Weisman @, Israel, Tuesday, November 05, 2013, 13:05 (1354 days ago)

Hi from Israel,

Does anyone know if there is a command that conveverts a string into a numerical variable(the old MSBASIC "VAL" / "... a = val (A$)") in 256 Basic?

Thanks,

Amos

How to convert a string to a numerical variable

by M Santos, Tuesday, November 05, 2013, 15:54 (1354 days ago) @ Amos Weisman

Hi
Use Float or Int

Example:

a$="1.5"
print (float(a$))^2

Returns....

2.25

How to convert a string to a numerical variable

by Amos Weisman @, Israel, Wednesday, November 06, 2013, 12:34 (1353 days ago) @ M Santos

Thanks!

RSS Feed of thread
powered by my little forum