Menu

Welcome to the BASIC programs sub-forum

2016-11-20
2019-03-16
  • Rob Hagemans

    Rob Hagemans - 2016-11-20

    Hi all,

    I've created this sub-forum with the intention for it to be a place where PC-BASIC community members can share their BASIC code, links and other resources about classic BASIC.

    Enjoy!
    Rob

     
  • Anonymous

    Anonymous - 2016-12-13

    Ok, may be every body knows how to copy hes programs to these site , but i dont know, copy them ???, move them ???, i dont know , please tellmy how.

    thanks.

     
  • Rob Hagemans

    Rob Hagemans - 2016-12-14

    Under the field where you type your message, there is a link or button "Add attachments". You can use that to attach a file to your message.

    Hope this helps
    Rob

     
  • Anonymous

    Anonymous - 2017-02-11

    Write a program in basic that shows the value
    of A through H (1 through 8) such that no value
    is adjacent to another value less than 2.

    I know the answer - I want to see how the
    FOR NEXT loops are nested

             A
           /|\
         B-C-D
         |X|X|
         E-F-G
           \|/ 
             H
    
     
  • Ronald Herrera

    Ronald Herrera - 2017-04-27

    I'm Sorry, I don't know what you will like to see. But I can share with the community some of the programs that I have been working in PC-BASIC. I will try to post an attachment. I'll be interested to see what people have to say abaout something itermidiate. Part of it was posted in some part of this forum but you may want to look at it finished. Remember, this is a spaguetti unstructered code (like the old times)... I thik this is why people may think that BASIC is not good for serious programming. But, again, it was fun doing it while testing not only the program but PC-BASIC at well.

     
  • Ronald Herrera

    Ronald Herrera - 2017-04-27

    This fille was was written by someone else, so I honor his work and make some modifications as it looks like he was trying to finalize it. It's a beautiful program, I just add some appealing touching to it. For a Tandy 1000 or PCjr taste.

     
  • Marco Ruigrok

    Marco Ruigrok - 2017-08-05

    Rob, there is a problem whit your basic emulator, the command "play" is out of running the program. Is this already a problem to disolved?

    this little program is the problem:

    10 for t=1 to 200:play"l64n=t;": next t

     
    • Rob Hagemans

      Rob Hagemans - 2017-08-05

      Hi Marco, which version are you using? What happens that you do not expect to happen?

      In 15.08.11 this seems to be working OK on my computer: like in GW-BASIC, it produces a sound of increasing pitch, then ends with an Illegal function call when t goes outside the allowed bounds 0-84 for the N subcommand.

       
  • Anonymous

    Anonymous - 2017-08-12

    I have installed PC Basic, but it cannot find my basic file. i have copied it to users but "file not found"

     
    • Rob Hagemans

      Rob Hagemans - 2017-08-12

      Please see here: http://robhagemans.github.io/pcbasic/doc/#mounting

      You can use the command FILES to see the files in your current directory. This may also help you locate which directory is set as the current directory.

       
    • Richard Couture

      Richard Couture - 2018-09-12

      My understanding is it is under c:\users\admin

       
  • Anonymous

    Anonymous - 2017-10-31

    Hi any one had experience with Economatics Smart box and using PC basic to access the Smart box, albeit probably the first problem will be... the usb to seriel port any idea's ?

     
  • Anonymous

    Anonymous - 2017-11-26

    DOES ANYONE HAVE SOURSE CODE FOR THE BUTTONS ON LINE 25.. WOULD LIKE TO CODE INTO A PGM SO IT OPERATES LIKE THE REAL ONE BUT, WOULD LIKE TO USE L/R ARRPOW + HIGHLIGHT CHOICES.

     
  • Richard Couture

    Richard Couture - 2018-09-12

    Hi! i am back after a long time to Basic for a pet project. I am trying to figure a way to choose a number from 1 to 16 in a random way until all number are choosen. I want to use this number to assign them to variable.
    Thank you
    Richard not a programmer by training

     
    • Everton da Silva Marques

      Try this:

      10 dim t(16)
      20 for i=1 to 16
      30 t(i)=i
      40 next
      50 n=16
      60 while n>1
      70 i=int(rnd * n) + 1
      80 print t(i)
      90 t(i)=t(n)
      100 n=n-1
      110 wend
      120 end
      
       
  • Brian Bange

    Brian Bange - 2019-03-14

    Hi, new to all this. I need to parse some text and no longer have access to Visual Basic 5.0. (dating myself). I can't seem to get the OPEN command to find my file, no matter how I type in the path. Right now the default path is C:\Program Files (x86)\PC-BASIC-1.2\pcbasic, which is where Windows installed the program. How can I get pcbasic to recognize my path to C:\Basic?
    Thanks,
    Brian

     
    • Everton da Silva Marques

      Brian,

      See the 'mount' option from documentation:

      You can map drives and other file system locations as PC-BASIC devices by
      using the mount option in the configuration file or on the command prompt.
      For example, on Windows, the option
      mount=A:C:\Users\Me\BasicFloppy
      will make the folder C:\Users\Me\BasicFloppy available as PC-BASIC's A:

      http://robhagemans.github.io/pcbasic/doc/1.2/

       
  • Brian Bange

    Brian Bange - 2019-03-15

    I tried this from a command prompt within windows and got:
    'mount' is not recognized as an internal or external command...

    I tried it from within the basic interpreter window and got:
    mount=A:C:\Basic
    Syntax error
    Ok

     
    • Everton da Silva Marques

      Suppose you want to mount your C:\Basic directory as drive A: for PC-BASIC.

      You have two options:

      1) Either run PC-BASIC from command prompt like this:

      pcbasic --mount=A:C:\Basic

      2) Or, before running PC-BASIC, edit the file PCBASIC.INI and add the following line:

      mount=A:C:\Basic

      You would find PCBASIC.INI in your %AppData% path:

      %AppData%\pcbasic-1.2\PCBASIC.INI

       

      Last edit: Everton da Silva Marques 2019-03-15
  • Brian Bange

    Brian Bange - 2019-03-15

    I had to search for it as it was not in the location you specified, but option #2 worked.
    Many thanks.

     
    • Rob Hagemans

      Rob Hagemans - 2019-03-16

      Hi \brian, what version of PC-BASIC and what operating system do you use, and how did you install PC-BASIC? I'm wondering how come things are not in the standard location - normaly the working directory of the start menu shortcut would be set to your documents or user profile folder, which is where programs would then go.

      Also have a look here: http://robhagemans.github.io/pcbasic/doc/1.2/#mounting

       
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.