Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!seismo!ukma!hsdndev!dartvax!mars!bates!lablues!mikero From: mikero@lablues.UUCP (Mike roberge) Newsgroups: comp.sys.apple2 Subject: Re: BASIC problem Message-ID: Date: 27 Jun 91 11:09:43 GMT References: <1991Jun25.054815.8451@clark.edu> Organization: L/A Blues BBS - Auburn, Maine (207) 777-3465 Lines: 27 apollo@pro-hindugods.cts.com (Amrit Chauhan) writes: > I am having problems with the VAL command in BASIC. Can someone help me > out here? I have a RamFAST SCSI Card in slot 7 mapping partions to slots > 7, 2, and 6. I don't know if that can cause this problem, but just in > case. Here is a portion of the program: > > 10 REM - VAL problems > 20 INPUT TI$: REM - This variable contains 9600, 2400, 1200, or 300 > 30 VAL (TI$) > 40 END > > This is not the program. The program itself is rather large, but this is > an example of the VAL command that does not work. If I was to run this > program with the value of TI$ = 9600, 2400, 1200, or 300, it does: > > ]run > D > If I'm not mistaken, you have to give the Val of a string to another variable. Ex., BAUD=VAL(TI$) I believe that's how it would work, and now BAUD or whatever variable you decide to use will contain the correct value. Anybody can correct me if I'm wrong (and I'm sure you will). But try that. Mike Roberge