User Tools

Site Tools


tutorials:basic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:basic [2013/07/14 17:04]
irl [Reading Input]
tutorials:basic [2022/03/23 02:18] (current)
rcs [External Resources]
Line 1: Line 1:
- 
-====== **Under Construction** ====== 
- 
-This page is under construction by user IRL. Please don't mess with it until I've removed this message. I'll be working on this over the next few hours. 
- 
- --- //[[irl@twenex.org|irl]] 2013/07/14 16:16// 
- 
 ====== Using BASIC ====== ====== Using BASIC ======
  
Line 70: Line 63:
 This is also an example of string concatenation. This is also an example of string concatenation.
 ===== Loops ===== ===== Loops =====
 +
 +Given that every line has a line number, it can become tempting to use the GOTO function. This function gives an unconditional jump to the specified line number. This is a bad idea.
 +
 +"The unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress. ... The go to statement as it stands is just too primitive, it is too much an invitation to make a mess of one's program." -- Edsger Dijkstra (March 1968). "[[http://dl.acm.org/citation.cfm?doid=362929.362947|Go To Statement Considered Harmful]]". Communications of the ACM 11 (3): 147–148.
 +
 +There are three structured programming loop structures available for use in BASIC: for, while and do.
 +
 +==== for loops ====
 +
 +==== while loops ====
 +
 +==== do loops ====
  
 ===== Conditionals ===== ===== Conditionals =====
 +
 +==== if statements ====
 +
 +==== switch statements ====
 +
  
 ===== Sample Programs ===== ===== Sample Programs =====
  
 //Users should feel free to add their programs to this section.// //Users should feel free to add their programs to this section.//
 +
 +===== See Also =====
 +
 +  * [[tutorials:basic interpreter|Using the BASIC Interpreter]]
 +  * [[tutorials:basic advanced|Advanced BASIC Concepts]]
  
 ===== External Resources ===== ===== External Resources =====
  
-  * [[http://manx.classiccmp.org/details/1,18285|the original manual]]+  * [[https://livingcomputers.org/UI/UserDocs/TOPS-20-v7-1/5_BasicPlus2_Lang.pdf|TOPS-20 BASIC-PLUS-2 Language Manual]]
  
tutorials/basic.1373821485.txt.gz · Last modified: 2013/07/14 17:04 by irl