Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!hplabs!hpcc05!hpcc01!drudman From: drudman@hpcc01.HP.COM (Drew Rudman) Newsgroups: comp.sys.apple2 Subject: Re: BASIC problem Message-ID: <1520034@hpcc01.HP.COM> Date: 25 Jun 91 19:54:26 GMT References: <1991Jun25.054815.8451@clark.edu> Organization: HP Corp Computing & Services Lines: 19 The VAL command converts a string to a numeric value. You can assign this conversion or use it in some fashion. Legal uses of the VAL function include: A = VAL(IT$):REM This will assign A with the numeric value of IT$ PRINT VAL(IT$):REM this will print the numerical value of IT$ If IT$ has a non-numerical first character, the numerical VALue of it will be zero. Hence VAL("AB23") = 0 and VAL("1203")=1203. I believe the function will convert to numerics until the first non-numerical character is encountered in the conversion string. ie VAL("123ABC") = 123. Using VAL in the way you have shown is improper. You should get a ?SYNTAX ERROR when you program encounters the line - I have no idea why it is hanging. [ Call... 9600bps/60meg ][ Drew Rudman ] [ The Charge ][ ] [ Apple ][ IBM ][ Internet: drudman@hpiosa.corp.hp.com ] [ (415) 321-4713 ][ The Charge BBS: Axe Slinger (#1) ]