Looking for val()

BlitzMax Forums/BlitzMax Programming/Looking for val()

Hey all. I just registered and I am plugging away learning how to handle text from files and what not in bmx. My night has more or less come to a halt when I noticed I can't find reference to a val() command to convert a string to an integer. Am I just sleepy and not seeing it? Thanks.

You should be able to do:

Local Asdf$ = "123"
Local Value = Int( Asdf )

Go to help, look up Language Reference, then the Strings section.

I think it goes something like

mystring:String="4321"
myval=mystring.ToInt()
print myval

Welcome to Blitz by the way :)

Thanks guys!