Menu

First, pasting what's missing in the description below (SEE CAPS THERE) so you can see the REAL problem

2018-07-24
2018-07-29
  • Alan Norris

    Alan Norris - 2018-07-24

    Rob—
    I don’t see any errors in an odd little program I wrote in your GW-BASIC emulator to get some practice before writing one I really want that would use some of the concepts in it. I used “PrintScreen” a few times so I could copy it and its output to this document. As you can see, the output was strange: Instead of printing just the desired string itself for an LS$(#) in the program as intended, it threw in an “LS$(#) = ” before it. Is there something I or you can fix to stop that from happening?

    THE "PRiNTSCREEN" IMAGE(S) SHOULD'VE BEEN RIGHT HERE. I COPIED THE WHOLE DOCUMENT / LETTER (IT'S A "WORD" DOCUMENT) IN ORDER TO PASTE IT HERE, AND THAT, OF COURSE , INCLUDED THEM, BUT FOR SOME REASON THEY WENT MISSING, SO THE "AS YOU CAN SEE" ABOVE NO LONGER APPPLIES. IS THERE ANY WAY TO GETAROUND THIS?

    Thank you, both for whatever you can come up with re the problem described above and for all you’ve done to bring this stuff back to life—it’s great for my aging brain (I still drive a stick-shift car, too!).
    Sincerely,
    Alan Norris

     
    • Rob Hagemans

      Rob Hagemans - 2018-07-24

      Hi Alan,

      Can you save the program and attach it here please?
      If you want to attach a screenshot, please attach the picture file directly. I don't think you can attach Word documents on this site.

      Rob

       
  • Alan Norris

    Alan Norris - 2018-07-25

    Hi Rob--
    With pcbasic up and the program in question on the monitor screen, I hit "PrintScreen" and tried to paste that here directly (i.e., without using Word), which I believe was your second suggestion, but this site apparently doesn't allow THAT either. As for your first suggestion, I HAVE saved the program to pcbasic itself (so I could load it as desired [as"SPELLING"]), and I think you wanted me to attach THAT here, but, alas, I'm not knowledgeable enough about computers to know how to do that. IF you can tell me the steps to do that, I'll try again; if not, and I want to pursue this further, would I have to resort to the laborious process of typing the program and its weird output in a future posting so you can see them?
    --Alan--

     
    • Rob Hagemans

      Rob Hagemans - 2018-07-25

      The text box you type your forum post in has a link below named "Add attachments" - that's the one you need to use to post program files and images. You can then choose files to attach from your computer.

      Whether it's the program file or a screeenshot of the program listing (if it's a short program) doesn't really matter but unfortunately I do need to be able to look at the program and the output, one way or another, to be able to see what the problem is.

       
  • Alan Norris

    Alan Norris - 2018-07-26

    Hi Rob--
    I tried that (AGAIN with the program up and after hitting "PrintScreen"), but the "Paste" option in this box was in light gray, not black, even though I clicked on "Add attachments" as you suggested. In other words, I couldn't paste anything here for you to see. So, as a last resort, as laborious as it is, I'll try typing everything here for you. I'll double-check what I type as I go along, but this is a very difficult task typo-possibility-wise (especially since there's no spell check in this posting box [or cutting or pasting, either, which would've really come in handy]), so I hope I'm successful. Here goes:

    1 PRINT
    5 PRINT "PRINT A WORD TWICE; ONCE AS IS AND THEN AGAIN (AFTER A SEMI-COLON) B Y SPELLING"
    10 PRINT "IT OUT ONE LETTER AT A TIME (SHOWN BY PUTTNG A HYPHEN AFTER EACH L ETTER"
    15 PRINT "[EXCEPT, OF COURSE, FOR THE LAST ONE])."
    20 FOR K = 1 TO 6
    30 READ L$(K) >> (Note: I originally typed "LS$(K") instead of just "L$(K) here, but there was
    no "S" there in the program, meaning I made the same typo in my original letter to you.)
    40 NEXT K
    45 PRINT
    50 PRINT "BAD; ";L$(2);"-";L$(1);"-";L$(4)
    55 PRINT
    60 PRINT "FACE; ";L$(6);"-";L$(1);"-";L$(3);"-";L$(5)
    70 END
    81 DATA L$(1) = A >> (Whoa--I think I may have found my mistake right here--I'm going to
    edit my data lines to put quotes around the letters and rerun the program
    again right now. I'll return to this posting right after I do that to tell you if that
    solved the problem or not--it didn't, but I still think the quotes should be there, so I left them in and will now continue my typing [after making a new LIST].)
    81 DATA L$(1) = "A" -- (modified as just mentioned, as, therefore, are lines 82--6)
    82 DATA L$(2) = "B"
    83 DATA L$(3) = "C"
    84 DATA L$(4) = "D"
    85 DATA L$(5) = "E"
    86 DATA L$(6) = "F"
    Ok
    RUN

    PRINT A WORD TWICE; ONCE AS IS AND THEN AGAIN (AFTER A SEMI-COLON) BY SPELLING >> (Note: That word was not on a second line--the length of the lines in this posting box are apparently shorter than the ones on the BASIC screen [the continuations of program lines 5 and 10 onto a next line of type occurred 3 characters sooner here than there, too].)
    IT OUT ONE LETTER AT A TIME (SHOWN BY PUTTING A HYPHEN AFTER EACH LETTER
    [EXCEPT, OF COURSE, FOR THE LAST ONE]).

    BAD; L$(2) =B -L$(1) =A -L$(4) =D >> (Presence and absence of spaces copied very carefully.)

    FACE; L$(6) =F -L$(1) =A -L$(3) =C -L$(5) =E >> (Shouldn't be spaces before the hyphens,
    either, which may have been slightly misstated in the original letter.)
    Ok >> (But,of course, it isn't!)

    WOW--that was a lot of work. I hope it all turns out to be worth it. Thanks again for whatever you can do about it.
    --Alan--

     
    • Rob Hagemans

      Rob Hagemans - 2018-07-26

      You can't provide a variale name in a DATA statement, so these are read as a list of strings including what is intended as a variable name. To get what I think you intended you'd need

      81 DATA "A"
      

      and so on. The quotation marks are optional in this case, but recommended.

      The "Add attachment" link will let you attach a file from your hard drive (click the "Choose Files" button that appears and pick a file in the "Open File" dialog window), it will not let you paste a picture from the clipboard. So you should first save the screenshot to a file, then attach it. If you still have problems with attaching files, I'd suggest you contact SourceForge's support team - they are the ones running this site.

       

      Last edit: Rob Hagemans 2018-07-26
  • Alan Norris

    Alan Norris - 2018-07-29

    Rob --
    Thank you VERY much. Your suggestion for the program fix worked, and I even think I understood your explanantion of why I needed to do it. On the other hand, I still don't really undersand what you said about attaching files, but it looks like I don't need to worry about doing that any more--if I do, I can always take your suggestion and contact SourceForge. One slightly worrisome thing did occur, however: When I first downloaded your pcbasic to my computer, I copied it to my flash drive in case the computer ever crashed, but when I tried running my little program from THERE to see if it had the updated version of the program on IT, instead of pcbasic coming up when I clicked on the icon for it, I got a message saying there was an error loading python27.dll (error code 126). I don't know what that means, but I guess I can live with it UNLESS the computer really does crash. If that happens, I can always redownload your pcbasic, but all the programs I'd've written for it before the crash would have to be reentered--a task so truly daunting that at that point I'd probably have to throw in the towel, and all the time I'd spent doing it all would end up being a waste (except, of course, for the challenge and fun I'd've had doing it).
    --Alan--

     
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.