I agree this is a bit counter-intuitive. The command-line parsing uses the standard argparse module, so it's a bit dependent on that module's quirks.
What happens is that --mount can take multiple arguments separated by spaces (or commas, or maybe other things). The program argument should really be the first argument, unless you use --run, as you point out. I'll see if I can amend the documentation to make that clearer.
It's great that you can now use PC-BASIC for your program! Let me know if you run into any further issues. Out of curiosity, what sort of program are you running on it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2014-08-17
Rob,
It is an old personal accounting program of my father's that, for reasons of hardware and OS obsolescence, needed to be ported to Linux. Nothing particularly demanding and of little interest other than to the author, but sufficiently long and convoluted that I didn't fancy re-writing.
Regards,
WJB
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The processing of the command line appears to be inconsistent.
./pcbasic TEST.BAS
loads and runs the TEST program.
./pcbasic --mount A:. TEST.BAS
doues not even load the program.
./pcbasic --mount A:. --run TEST.BAS
does load and run the TEST program.
Since the --run switch is an adequate work-around, I have not looked at a patch.
It appears that PCBASIC will now correctly run the program I have been trying to port. Thanks for making this available.
Regards,
WJB.
Hi WJB, thanks again for helping sort out issues!
I agree this is a bit counter-intuitive. The command-line parsing uses the standard argparse module, so it's a bit dependent on that module's quirks.
What happens is that --mount can take multiple arguments separated by spaces (or commas, or maybe other things). The program argument should really be the first argument, unless you use --run, as you point out. I'll see if I can amend the documentation to make that clearer.
It's great that you can now use PC-BASIC for your program! Let me know if you run into any further issues. Out of curiosity, what sort of program are you running on it?
Rob,
It is an old personal accounting program of my father's that, for reasons of hardware and OS obsolescence, needed to be ported to Linux. Nothing particularly demanding and of little interest other than to the author, but sufficiently long and convoluted that I didn't fancy re-writing.
Regards,
WJB