Menu

Command Line Inconsistency

Anonymous
2014-08-17
2014-08-17
  • Anonymous

    Anonymous - 2014-08-17

    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.

     
  • Rob Hagemans

    Rob Hagemans - 2014-08-17

    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?

     
    • Anonymous

      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