hello friends! new(ish)!
BASIC: Difference between revisions
Jump to navigation
Jump to search
>Chocolate Chip m (→Structure) |
>Chocolate Chip m (→Structure: fix characters. It needs caps becuase basic terminals do not support case afaik) |
||
Line 7: | Line 7: | ||
Hello World in Basic: | Hello World in Basic: | ||
{{hc|10 REM | {{hc|10 REM THIS IS A BASIC COMMENT. BASIC COMMENTS ARE VALID UNTIL A LINE BREAK | ||
20 REM A | 20 REM A BASIC PROGRAM FOR BASIC "HELLO WORLD" | ||
30 PRINT "HELLO WORLD" | 30 PRINT "HELLO WORLD" | ||
40 GO TO 30 REM | 40 GO TO 30 REM YOU CAN ALSO PUT A COMMENT AFTER A FUNCTIONING LINE | ||
RUN| | RUN| | ||
HELLO WORLD | HELLO WORLD | ||
HELLO WORLD | HELLO WORLD | ||
HELLO WORLD | HELLO WORLD | ||
REM " | REM "PRINT" WILL REPEAT ITSELF UNTIL IT CATCHES AN INTERUPT | ||
}} | }} | ||
Revision as of 05:51, 19 January 2016
BASIC (an acronym for Beginner's All-purpose Symbolic Instruction Code) is an archaic computer language originally designed for simplicity for home users with personal computers. In the early days of PCs, computers would boot into a BASIC terminal, and from there you would conduct your business. There were many flavors of BASIC, including IBM Basic, Atari BASIC, and Famicom Basic (though this form of BASIC was never available for the Nintendo outside of Japan).
Structure
Basic uses a simple coding structure that anyone can master. Each line is separated by a break and a number.
Hello World in Basic:
10 REM THIS IS A BASIC COMMENT. BASIC COMMENTS ARE VALID UNTIL A LINE BREAK 20 REM A BASIC PROGRAM FOR BASIC "HELLO WORLD" 30 PRINT "HELLO WORLD" 40 GO TO 30 REM YOU CAN ALSO PUT A COMMENT AFTER A FUNCTIONING LINE RUN
HELLO WORLD HELLO WORLD HELLO WORLD REM "PRINT" WILL REPEAT ITSELF UNTIL IT CATCHES AN INTERUPT