![]() If by commas, BASIC moves to the start of the next zone. The PRINT statement allows several quantities, including quoted strings, separated by commas (,) or semicolons ( ). The DIM statement allows other upper limits, but the zero element is always provided. Without a DIM statement, the default dimensions are 0 to 10 for each dimension. ArraysĪ single letter followed by a “(“ denotes an array element, which may be one or two-dimensional. ![]() This provides for 286 possible variable names. ![]() Variable names can be a single letter, or a single letter followed by a single digit. The RND function needed a dummy argument to get past the syntax scanner. INT The integer part (truncating toward 0)Īrguments for SIN, COS, TAN, and the value from the ATN, are assumed to be in radians.Įrror messages are given for arguments out of range for the LOG and SQR functions, although SQR then provides the SQR of the absolute value. In the GE-225 and GE-235, this meant a precision of about 30 bits (roughly ten digits) with an base 2 exponent range of -256 to +255. That isĪll arithmetic was done in floating point. ![]() There is one anomoly: a leading minus sign is treated as unary, and has higher precedence that exponentiation, which is contrary to the usual practive. (a - b - c) is understood to be the same as ((a - b) - c) Left-association is used for multiple operations within a group. Normal precedence rules are used: Exponentiation, multiply and divide, add and subtract. Arithmetic Expressionsīesides the four standard arithmetic operations, BASIC includes raising-to-the-power, the symbol of which is “^”. In addition, the slightly more recent version of BASIC that we are using includes the INPUT statement. RETURN Returns from the end of the subroutineĭEF Introduces programmer-defined functions GOTO Does just that, transfers to another line-numbered statement READ Assigns values to variables from internal data LET Introduces the assignment statement, and is required There were fifteen statement types in the original BASIC. This note gives an outline of the language for those of you familiar with programming. This document is reproduced courtesy of Thomas Kurtz The Original-Original Versionĭartmouth BASIC revolutionized computer programming for the non-experts, who greatly outnumber the experts! It was a simple language, used English words, and gave almost instantaneous response in the days when turnarounds of hours or even days was the norm.
0 Comments
Leave a Reply. |