|
Register or have you forgotten your password?
|
|
|
| Amiga OS -- Development This particular forum deals with issues regarding development for all versions of AmigaOS. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 | ||||||||
|
Premium Member
Join Date: Nov 2005
Posts: 8,666
|
I've scoured the Blitz manual and searched online but I can't find an answer to this... How on earth do I read command line arguments from Blitz?
-- moto |
||||||||
|
|
|
|
|
#2 | |||||||||
|
Defender of the Faith
![]()
Join Date: Mar 2002
Posts: 1,520
|
From the manual (about page 129)...
Quote:
|
|||||||||
|
|
|
|
|
#3 | ||||||||
|
Premium Member
Join Date: Nov 2005
Posts: 8,666
|
Thanks! I didn't think of searching the document for "parameter" :roll: I guess the command I'm looking for is "par$(parameter)". So if I ran the programme like this:
1.>myprog arg1=value Then the command "str$=par$(arg1)" would set the variable str$ to "value". Right??? Thanks -- moto |
||||||||
|
|
|
|
|
#4 | ||||||||
|
Premium Member
Join Date: Nov 2005
Posts: 8,666
|
Ok, got it working by using "b$=Par$(1)". Now, is there any way to convert the string variable b$ to a byte variable so I can pass it to the parallel port?
-- moto |
||||||||
|
|
|
|
|
#5 | ||||||||
|
Defender of the Faith
![]()
Join Date: Oct 2002
Posts: 1,876
|
Try the Val command, it converts a numeric string to an integar.
eg. my_number.b=Val(Par$(1))
__________________
[size=xx-small]On schedule, and suing[/size] |
||||||||
|
|
|
|
|
#6 | ||||||||
|
Premium Member
Join Date: Nov 2005
Posts: 8,666
|
That works - thanks! :-) I had to add a "%" to the beginning of the string, but then it worked.
When I create an executable from the "Compiler" menu and then run the programme from the shell, it doesn't do anything. The relays don't change. If I run it inside Blitz then it works. Why might this be? -- moto --EDIT Forget that, I think I just had to close the Blitz editor as it was hogging the port. It's all working now :-D :-D :-D Thanks a lot for your help guys!!! |
||||||||
|
|
|
![]() |
| Bookmarks |
| Tags |
| reading , line , command , blitz , basic , arguments |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Blitz Basic 2.1 | Kevin0001 | Amiga Software Issues and Discussion | 0 | 04-27-2008 10:32 AM |
| Blitz Basic 2.1 | Invisix | Amiga OS -- Development | 4 | 03-15-2006 07:03 PM |
| Running Games Command Line | nasty | General chat about Amiga topics | 8 | 01-06-2006 07:40 AM |
| Blitz Basic | Kinster | Amiga Marketplace | 1 | 03-03-2005 03:07 PM |
| Blitz Basic | melott | Amiga OS -- Development | 7 | 06-12-2003 08:18 AM |