Menu

the "RUN" statement within a program

Mona B
2017-09-04
2017-09-04
  • Mona B

    Mona B - 2017-09-04

    I'm trying to use a RUN statement within a program, and I keep getting the error messages "path not found" and "undefined line".

    I attempted to use it all of the following ways:

    230 IF CHOICE% = 1 THEN RUN "A:\SIREN"
    
    230 IF CHOICE% = 1 THEN RUN "SIREN"
    
    230 IF CHOICE% = 1 THEN RUN "~/BASIC/SIREN"
    
    230 IF CHOICE% = 1 THEN RUN "A:\BASIC\SIREN"
    

    None of these work. And I could not find more clear instructions in the documentation.

    What is the proper format for this?

    I am using PCBasic on Ubuntu 16.04

     

    Last edit: Mona B 2017-09-04
  • Rob Hagemans

    Rob Hagemans - 2017-09-05

    The third version won't work, PC-BASIC requires MS-DOS style paths. The others might work, depending on where in your file system you've mounted PC-BASIC's drive A: and what is the current directory when the line is executed.
    Have you mounted A: to a location in your file system? What happens if you try FILES "A:"?

    See http://robhagemans.github.io/pcbasic/doc/#mounting for more information on how to access your file system from PC-BASIC

     
  • Mona B

    Mona B - 2017-09-05

    My .bas files are located in ~/BASIC. I have not mounted a path to them. I usually open PCBasic in the BASIC directory thru the command line.

    So if I understand correctly, I will need to mount my path to the BASIC folder first?

    At that point, how do I express the path within the program?

    Up until now, I've avoided mounting, simply because I dont understand the same thing I don't understand here - how to properly write/format the expression of it.

    I just attempted to mount with mount=A:/home/me/BASIC

    It produced an error when I open PCBasic from the command line, in my home folder WARNING: Error in configuration file /home/me/.config/pcbasic/PCBASIC.INI. Configuration not loaded.

    Thanks for all of your help.

     
    • Rob Hagemans

      Rob Hagemans - 2017-09-05

      Hi, could you attach the full configuration file? The mount line looks correct, in principle, so there might be some other reason why you see that error.

       
  • Mona B

    Mona B - 2017-09-05

    Here ya go. Right now, the mount line is commented out to avoid the error message. It was not commented out when I tried it, but that is the setting I tried.

     

    Last edit: Mona B 2017-09-05
    • Rob Hagemans

      Rob Hagemans - 2017-09-12

      Hi, can you send me the file that produces the error? To be able to see how the error occurs, I need to see the file that causes the actual error, not with the lines commented out. For example, did you leave a space in front of mount when you uncommented it? That might perhaps cause such an error.

      For now the only thing I can see that is strange is this:
      - the line preset=tandy should not be under [preset]. If you want to use the tandy preset, use that line under the heading [pcbasic]. As it is, you are defining a preset named preset

       
  • Anonymous

    Anonymous - 2017-09-11

    I have attempted to change another line in the configuration file, resulting in the same error message. All I did this time is remove the "#" from the contrl-c-break=True line.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.