User:K12308025
From Wikipedia, the free encyclopedia
Programming in True BASIC
Introduction:
True basic is a programming language, a branch of BASIC. It can be very useful. Here I will teach you how to program in True BASIC. If you have any questions, please post them at the bottom of the page. Or on the discussion page. If you wish to program, and you do not have True BASIC, I am sorry as I cannot legally give it to you. However, you can post your programs at the bottom of the page so I may post a screenshot of your program on the page. I am sorry if I am hard to comprehend or I am incorrect. I am still only a student in programming language.
Part 1: The Basics
Here, you will learn the LET, PRINT, END, and REM statements (Example at end of part 1). You will also learn how to run a program and what will 0if ran. In some cases, there is an error and the program will not run. In such cases, an error window will pop up showing where there are errors. If you do not understand the examples I have provided for you, there is an example of every statement at the end of Part 1.
Let us start with the REM statement. Its purpose is to create comments. True BASIC overlooks these, and anything on the right of them. This is only true for the column of the REM statement, e.g.
REM The “!” can also be used as a REM statement. REM Normally, these sentences would be illegal statements, REM but anything behind a REM or “!” statement is ignored.
Now is the END statement. The end statement terminates the program. There can only be one END statement in a program, and there must be an END statement in a program. e.g.
! Remember, anything on the right of a REM or a “!” is a comment, ! and comments are ignored by True BASIC. ! Since the comments are ignored, they can be used on the right side of ! any statement, including an END ! end statement, like this ! They can also be used after the END statement.
Next is the PRINT statement. This statement is the most important statement in Part 1 as it displays text on the display window.
PRINT “Hello!” PRINT “Note that the ‘!’ are not in affect inside the PRINT statement’s” PRINT “quotation marks.” PRINT “However, as shown to the right, they are in affect outside” ! Like this. PRINT “Also note that quotation marks cannot be used” PRINT “inside other quotation marks. That is why I must use” PRINT “single quotation marks (‘’) ” PRINT ! Printing a blank line PRINT “Above is an example of printing a blank line” PRINT “If you wish to know more in depth about the PRINT statement,” ! go to the ! end of Part 1
Finally, the LET statement. The purpose of the LET statement is to assign numbers or strings to variables. A variable is any word or arrangement of letters that holds the value of a number.
LET VARIABLE = 123
In this example, VARIABLE equals 123. so if I were to print VARIABLE, (when a variable or string is printed, there is no need for quotation marks. Adding quotation marks around the variable or string name will only print the variable or string name.)
Part 2: Input
Part 3: Subprograms
Part 4: Loops
Part 5: Decisions

