Qbasicnews.com
July 06, 2020, 07:58:48 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: command$ doesnt accept Numeric value please help  (Read 1299 times)
Fuseflow
New Member

Posts: 5


« on: October 07, 2004, 11:30:01 AM »

Hi
I Tried it works but only accepts as A string value i need value passed to be Integer when i use Cint function it gives me error

there is my code

abc.bas
if command$ > "" then
a% = command$
c% = a% + 1000
print c%
end if

but the same code works if i use a$


when i compile it trows me a error type mismatch
please help.
thanks in advance
Logged
VonGodric
Ancient Guru
****
Posts: 674



WWW
« Reply #1 on: October 07, 2004, 11:46:48 AM »

if command$ > "" then
a% = val(command$)  '<--- VAL does the trick!
c% = a% + 1000
print c%
end if
Logged

url]http://fbide.sourceforge.net/[/url]
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!