Looking for val()

BlitzMax Forums/BlitzMax Programming/Looking for val()

JetFireDX(Posted 2004) [#1]
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.


Michael Reitzenstein(Posted 2004) [#2]
You should be able to do:

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


BODYPRINT(Posted 2004) [#3]
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


Perturbatio(Posted 2004) [#4]
Welcome to Blitz by the way :)


JetFireDX(Posted 2004) [#5]
Thanks guys!