Qbasicnews.com

Full Version: Need Urgent help in passing arguments
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all,
I need some help in Qbasic programming.

I need to pass the argument directly to executable such as
notepad "c:\test.txt"

here is my pogram

abc.bas

input "enter name" , a$
print a

but i need to pass the abc "try me" and it should print
welcome tryme

Thanks in Advance,
Mat@fuseflow.com
Try COMMAND$ statament.

'start program:
blabla.exe "try me"

and in program do so:

if Command$>"" then
print "Hello " + Command$
end if
Quote:Try COMMAND$ statament.

'start program:
blabla.exe "try me"

and in program do so:

if Command$>"" then
print "Hello " + Command$
end if
Thanks it works i need one more reference. I lost my Qbasic REference manual and dont remember any command set .
Can u tell what is for convert a String to integer Cstr or Cint or if u have link please forward me for the reference

thank you,
Mat
Quote:Try COMMAND$ statament.

'start program:
blabla.exe "try me"

and in program do so:

if Command$>"" then
print "Hello " + Command$
end if

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

when i compile it trows me a error type mismatch
please help.
thanks in advance
VAL(atring$) vonverts to numeric value :wink:
Quote:VAL(atring$) vonverts to numeric value :wink:

thank you once again.
U Guies are fast .

If you guies need any help in Java - SMS Technology please do ask you i can help you.

Thanks again
No problem :wink: