Menu

LIST

2016-09-12
2019-02-02
  • Ronald Herrera

    Ronald Herrera - 2016-09-12

    Hi, could one of the settings of configuration can be the speed of the program listing? I mean, if a program of thosand of lines list in a fraction of a second or whole, will be impossible to look at the structure or anything of the listing; on less you specifiy it with LIST command e.g. LIST 2000-2200. But a listing longer than 10,000 lines to serch and correct possible bugs in the program can be frustrating. I know that a listing longer of thousands with a speed of 1 cycle per second can be also frustrating, but to skim and search something of a long listing and breakup in the moment can be productive to the programmer in certin speed. ¿Did you catch my idea? ¿Could this be done?

    Ronald.

     
  • Rob Hagemans

    Rob Hagemans - 2016-09-12

    Hi Ronald, I don't think it's impossible but to be honest it's not something I'm likely to spend time on at the moment... It seems the experience, frustrating as it is, actually replicates the old GW-BASIC quite well, which is what it aims to do. It simply was a pain to edit programs in the GW-BASIC environment.

    If you want to use PC-BASIC for development, have you considered using an external text editor for your programs? I find Github Atom and Notepad++ to be good options. It's quite convenient as you can edit the program in the editor and keep PC-BASIC running in a separate window, reloading the program when necessary.

    Alternatively, check out Nauman Umer's IDE for PC-BASIC - they're building a Visual Studio-like IDE with syntax highlighting and something akin to IntelliSense, which calls PC-BASIC internally. I admit I haven't tried it yet (I'm not usually on Windows and it's currently Windows-only) but it sounds pretty cool!

    Rob

     
    • Anonymous

      Anonymous - 2018-02-26

      Rob -
      More than 30yrs ago I wrote a series of PC-BASIC programs. The listings that I made at the time were lost in a move. Since no modern computers can directly access those old programs I had dispaired of ever being able to access or run them. Then I stumbled across your PC-BASIC emulator online. I downloaded and installed it. I had a few issues, but I succeeded in opening the programs and printing new listings. Now I would like to do some editing in the programs, but ran into the same problem that Ron did. After all these years I didn't remember the difficulty with editing in GW/PC-BASIC. I came across this topic when looking for help with on-screen editing. This topic answered the question - not easy. Now my question: Can you tell me the steps needed to move the BASIC code to Notepad and back as you suggested above?
      Thanks
      Brian Chapman

       
      • Rob Hagemans

        Rob Hagemans - 2018-02-28

        Hi Brian,

        Once you've loaded a program, you can use SAVE "program.txt",A to save the listing to a text file program.txt which you can open and edit in Notepad. You can then simply do LOAD "program.txt" to load the changed version.

        Hope this helps,
        Rob

         
  • Ronald Herrera

    Ronald Herrera - 2016-09-16

    Understandable, for example: I love to create, edit and manipulate listing programs in its own environment. I mean I like to see the listing flowing and looking the creation… anyway. I use Notepad for extended data or special paste strings, but most of the list is done in GW and now PC-BASIC (thank you for letting it be do edit on it). Other people may say, what waste of resources and patience when debugging on its own environment. It’s like killing someone; you do not want to let a gun or pistol to do the dirty job for you… its invigorating and a rush when doing it yourself… ones might dream… of course.

    The thing is… that the issue is a very fast environment you have created (thank you!), but the speed of the “listing only” could be as same GW BASIC does? Anyhow, as you said probably this is a non-priority feature and maybe it doesn’t have to shine copycat perfection. But thank you for your comments and keep up with the good work. 

    Ronald.

     
  • sinnerman

    sinnerman - 2016-09-28

    i have an old dedicated MS-DOS computer for GW-BASIC development. Since 30 years of GWBASIC experience I'm just using the SK (SideKick) notepad to edit my programs. Because it's a TSR it's very easy to use by just a two-key combination (Alt+Control). You might want to try...

     
  • Ronald Herrera

    Ronald Herrera - 2016-10-21

    Yes, thank you I have heard about the TSR SK it was very useful for those days, But I'm not so trouble with editing with PCBASIC platform, it was just a point of view about the real feel of using the application just exactly like those days in GWBASIC or BASICA. Unless there are features that I haven't known of; since PC-BASIC is a stand-alone ware, it can't handle a memory program (TSR) like DOS does. I know that adding extra features to PCBASIC can be headache when I concord with Rob that PCBASIC should resembles almost identical to GWBASIC (which that’s the goal). But the speed of the listing is a factor to assure appearance with GW and also a relieve for the programmer. People would never use GWBASIC or in this case PCBASIC as once was needed in the 70’s. With the exception of obsessive hobbyist or people that have o lot of free time. “As once I told you in your house: Welcome to My World”. Thank you! 
    Ron.

     
  • Robert MacKenzie

    Didn't there used to be a "Page" option in the LIST command? It was just a ",P" add-on. It just printed enough complete lines to get to the bottom of the page, and threw up a "Enter for More" or something similar. You could also hit escape to stop there and edit your text, once you found it.

    OMG - How was there not a CTRL-C and CTRL-V in GW-BASIC? Would it be so hard to implement? I know you're striving for genuine GW-BASIC experience here. But it is 2018...

    My work around is to re-number a line in order to make a duplicate. Then I re-LIST them so now I have two identical lines with different line numbers. This is OK if I just want a number of duplicates.

    But what if I want to break up a line into two lines? Can I use something like CTRL-ENTER at the place I want to split them up? No such thing.

    So I have to go back up and CTRL-END to truncate the previous line, then I press enter to go to the new line then I hit right-arrow over the line number and delete until the previous line part is gone...

    ... (Hella YAWN)...

    Some minor edits would make a WORLD of difference to people that actually want to create with this amazing tool. Just a thought...

     
  • Rob Hagemans

    Rob Hagemans - 2018-07-09

    I'm not aware of a paging option in the GW-BASIC LIST statement. You may be thinking of MS-DOS's DIR /p.

    PC-BASIC already has the possibility to copy and paste text, but it does not use Ctrl+C as that key combination already had a different meaning in GW-BASIC, 2018 or not. Have a look at the documentation where the keyboard shortcuts and other methods are discussed.

    If you want to do a lot of text editing on your programs, I would suggest using a proper text editor (which will have a lot of the modern conveniences that you are looking for) and using LOAD to load the result into PC-BASIC. The purpose of PC-BASIC is not to be a user friendly text editor - it is to replicate GW-BASIC.

     
  • Buddha Random

    Buddha Random - 2019-02-02

    You can already list a range of line numbers in GW-BASIC, using the LIST command:

    LIST -1000
    LIST 60-
    LIST 10-50
    

    Will list all lines up to and including line 1000 and the second line will list all lines from 60 and up, lastly the final example will list, you guessed it, all lines from 10-50. Note the placement of the - in all three lines. LIST accepts arguments in order to make debugging easier. I'm not sure what version this was added in on, but I seem to not remember being able to to this in eariler verisions. However I could be wrong, I was never good at reading manuals.

    Speaking of, this particular inforamtion can be found in the GW-BASIC manual, under LIST and LLIST.

    I know that's already well known, but I remember writing a single line that both listed, the source line by line, up a the specified amount, and then used INPUT in order to create a pause along the way, say every 20 or so lines. I don't remember exactly how I did it, but it shouldn't be hard.

    You can write a single line out like:

    0 FOR FIRST_LINE TO ENDLINE: PRRINT "CONINUE": INPUT: GOTO 0

    Just an example, however you'll need a IF statement and a way to increment FIRST_LINE. It worked, I just don't remember how i did it.

     

    Last edit: Buddha Random 2019-02-02
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.