1 definition by A name not currently in use!

1. Beginner's All-purpose Symbolic Instruction Code: A line-oriented, limited programming language invented in the 1960s for the purpose of teaching university students to program computers.

Each line of BASIC code must be preceded by a number, which serves as a label for the GOTO statement.

The type of a BASIC variable is determined by a suffix. For example, A$ is a string, while A% is an integer.

2. Any programming language that borrows a few things from BASIC, even if it is also heavily influenced by other programming languages, such as Pascal. Includes QBASIC, FreeBASIC, PureBASIC, Visual Basic, and DarkBASIC, and other similar programming languages. These BASICs frequently add support for functions and user-defined types, and they also frequently don't allow user-defined types or arrays to be passed as arguments to functions.

Such languages are typically surrounded by communities that eschew the sort of structured programming that is mandatory in the majority of other programming languages. As such, parallel arrays are preferred over user-defined types, GOSUB statements are preferred over functions, single-line IF statements in conjunction with GOTO are popular even in BASICs that support block IF statements, and GOTO is often used when a loop statement would suffice and be more readable. Even when control structures are used, it is rare to see any sort of indentation of the code that goes within a construct. A notable exception to this tendency is the Visual Basic community.

A similar programming language is INTERCAL.
REM A typical BASIC program, in a typical sense-2 dialect of BASIC
10 INPUT "ENTER YOUR NAME: "; A$
GOSUB CheckName
IF NameOK% = 1 THEN GOTO Good
PRINT "Are you sure you're not somebody else?"
GOTO 10
Good:
PRINT "THE SECRET WORD IS " + CHR$(33) ;
REM We don't need no stinkin' indentation!
FOR N = 1 TO 7
READ C%
PRINT CHR$(C%);
NEXT N
PRINT CHR$(33)
GOTO Terminus
CheckName:
IF A$ = "Osama bin Laden" THEN RETURN
NameOK% = 1
RETURN
Terminus:
DATA 77,65,76,65,82,73,65
END
by A name not currently in use! January 31, 2009
Get the BASIC mug.