Need val func that works
BlitzPlus Forums/BlitzPlus Beginners Area/Need val func that works| 
 | ||
| I need to change strings to numbers. I downloaded a function VAL# that's supposed to work but I can't get it to work.  This is very important because I'm re-writing a check register program so that it has more features.(I originaly wrote in basic 7.1.)Where can I get a val function that works? | 
| 
 | ||
| Blitz will auto-convert between variable types for you, most of the time... a$ = "10"
b = a$
c# = "42.5678"
print a
print b
print c#
print int("30") + int(a$); Notice I force the conversion to integer here
                         ; to ensure an addition rather than a string concatenation! | 
| 
 | ||
| Use blitz's int() function: number = int(string$)Edit: Whoops... Pete already mentioned it :) | 
| 
 | ||
| Thanx! |