Menu

writing comments

Anonymous
2017-12-28
2017-12-29
  • Anonymous

    Anonymous - 2017-12-28

    Hi,
    I'm a very beginner in GW-BASIC and i want to modify some old programs written by father in that language in the '90s. I want to ask you how it's possible writing comments in program lines. For example:

    114 N=9
    116 A=Z1/360
    118 B=Z2/360
    120 C=(B-A)/Z5
    130 D=0

    This is a part of a my program. I want to write a simple comment between line 118 and line 120 (or in the same line 118), reminding me, opening it next time, why i've done that operation or similar.
    I don't want the comment in the output file:
    3 OPEN "O" , #1 , "DATI"

    Thank you for the support

    Federico - Bologna - Italy

     
  • Rob Hagemans

    Rob Hagemans - 2017-12-29

    Hi Federico,

    You can include coments by preceding them with REM or an apostrophe '. E.g.

    110 REM this is a comment
    120 D=0: REM this is a comment too
    130 A=1 'and this is also a comment
    

    All statements and functions are documented at pc-basic.org/doc although it's not really a learning resource. This old tutorial by Steve Estvanik looks good, though: http://www.o-bizz.de/qbtuts/gw-train/

    Hope this helps
    Rob

     
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.