Hi all,
While I'm not new to BASIC....I am new to FreeBasic........
back in the Stone Ages, we'd assign line numbers, e.g.:
10 blah-blah
20 blase-blase
30 GOTO10 .................etc. etc.
Can you do that in FreeBasic? I notice that within the FBide.....it automatically assigns a number out along the left-most margin.
By the way: glad to be here!
HG
Line Numbers?
-
- Posts: 50
- Joined: Oct 27, 2011 1:51
- Location: Texas
- Contact:
-
- Posts: 94
- Joined: Aug 19, 2011 18:28
Hi HillbillyGeek, wellcome at the forum.
Yes, you can use code like
I recommend to get rid of this old constructs. Try to learn modern flow controls like DO : ... : LOOP and SUBs/FUNCTIONs.
Yes, you can use code like
Code: Select all
#LANG "deprecated"
10 ?"Hello"
20 GOTO 10
FreeBASIC supports two types of line identifiers, ALTHOUGH THEIR USE IS NOT RECOMMENDED (see previous post of TJF):
Alphanumeric line labels:
- Must start with a letter.
- Must be followed by a colon.
Line numbers:
- Only valid in -lang deprecated or fblite or qb.
You can mix alphanumeric labels and line numbers in the same program.
Using FBIde, you must enter manually each line identifier (no more automatic proposed line numbering as with empiric BASIC line editor).
Alphanumeric line labels:
- Must start with a letter.
- Must be followed by a colon.
Line numbers:
- Only valid in -lang deprecated or fblite or qb.
You can mix alphanumeric labels and line numbers in the same program.
Using FBIde, you must enter manually each line identifier (no more automatic proposed line numbering as with empiric BASIC line editor).