Draft for Information Only
Content
BASIC
BASICThe acronym BASIC stands for Beginner's Allpurpose Symbolic Instruction Code. BASIC is a kind of elementary algebraic programming language developed by John G. Kemeny and Thomas E. Kurtz at Dartmouth College. The BASIC language is a simple native Englishlike programming language. The Englishlike feature with simple vocabulary and grammar makes BASIC language easier to be picked up by a beginner to write useful computer programs and understand the meaning of the program statements at the same time. The native programming feature with ordered statements, loops, functions and subrountines also makes BASIC language easier to be presented in a complete and precise way that both the programmer and computer can be understanded without ambiguities and redundancies. Besides, the simple feature with limited capability also makes BASIC programming language an easier language to learn. However, the simple native Englishlike programming feature is also the weakness of BASIC language because simple BASIC variables, functions or expressions only allow solving simple problems and the making use of simple tests and jumps, e.g if, gosub, or goto, in programming will make the program difficult to follow and maintain.The BASIC language is usually implemented as an interpreter, BASIC language becomes the most popular easytolearn language on the early personal computers with builtin BASIC language interpreter in the machine's firmware. Since BASIC programming language is originally designed for beginner to understand how to program a computer to perform tasks, BASIC language is not suitable for programming complex application. With the widespread of personal computer, many versins and extensions were introduced to the original BASIC language. Additional features, such as string manipulation, more data types, graphic support, and file system manipulation, are added to BASIC language to increase the capability of BASIC language. Besides, some versions of BASIC language also supports structured programming by adding features, such as additional structure controls and proper subroutines supporting global and local variables. Dartmouth BASIC Language (1964 version)BASIC ProgramA BASIC language program is composed of numbered lines of englishlike statement. All lines in a BASIC program start with a line number. In general, each line is a statement used for instructing the computer to perform a specific task. Line numbers are used to identify the lines in the program. Besides, line numbers are also used to specify the order of lines of statement to be executed. Lines of statement can be entered in any order because the computer will sort all entered statements into order before processing. And therefore statements of a program can be changed or corrected by reentering the line of statement with the same line number at any order. After the line number, each statement starts with a word of BASIC language vocabulary. All words used in a BASIC program can only be capital letters. Unlike English sentence, spaces have no significnce in a BASIC statement except those spaces in printed out messages. All statements used in BASIC language are well defined without using the space character. The word after the line number is used to denote the type of statement. Sometimes comma is used as a word separator. Space may be used between words to make the statement more readable but space will be ignored during prcessing except those spaces in printed out messages.VocabularyBASIC vocabulary word is the fundamental component of BASIC program. A BASIC key word is used to specify the type of statement and to instruct the computer how to complete the task of the statement. BASIC vocabulary words are limited to those predefined key words that are understood by the BASIC interpreter.For example, READ, DATA, LET, GOTO, etc.FunctionBASIC function keyword is another common component of BASIC program. A BASIC function key word is used to denote the name of common standard mathematical function and to instruct the computer how to process the argument enclosed in parentheses attached to the function name before return the result of functional computing. BASIC function keywords are also limited to those predefined functions that are understood by the BASIC interpreter. For example, SQR(), SIN(), EXP(), ABS(), etc. In other words, a BASIC function keyword can be considered as a specific functional transformation of the argument enclosed in parenthese attached to the specified function name.VariableA variable in BASIC language is only used to represent a number similar to that used in a mathematical algebraic expression. Therefor a variable may be used to represent a known constant, number, which may be varied according to the given condition, or an unknown variable, number, which is an unknown to be determined from some known constants or varibles. The valid forms of a variable name in BASIC language are either any single english alphabet letter in Majuscule forms or any single english alphabet letter in Majuscule forms followed by any single numerical digit. For example, A, z9, etc. In other words, BASIC language can only have 286 variable names only.NumberA numerial value is a number in BASIC language which may contain up to nine digits only with or without a decimal point or a minus sign. For example, .123456789, .000000001, 999999999. are a valid number in BASIC. In order to have a wider range of number support, the exponent concept are used by multiplying a number with a factor of a power of ten. A letter E is used to be attached to a number representing "times ten to thee power" followed by the index of power. For example, 123.456=123456E3=123456000E6=.000123456E6. The exponential letter can only be existed after a number. Since the exponential part cannot be existed alone, for example E2 is invalid for numeber 100, otherwise the exponential part will be interpred as a variable in BASIC. Besides, since BASIC language only support up to nine digits, .0123456789 can only be expresented as .123456789E1.Exponential SymbolThe exponential symbol supported in BASIC language is the letter E. And the exponential letter can only be existed after a number. For example, .123456789E1.Grouping SymbolThe two grouping symbols supported in BASIC language are double quotes "" and parentheses (). The paired double quotes or quotation marks are used to wrap characters in between as one single message. For example, "This is a message". The paired parentheses or the open and close parentheses are used to group of the same level or order of operation as one single operation. For example (A+3). In general, a paired BASIC grouping symbol can be considered as a general function to return the argument enclosed.StringA string message is a string in BASIC language which is wrapped characters emclosed by a paired double quotes. For example, "This is a string".Data SeparatorThe data separator supported in BASIC language are comma ",". The comma "," is used to separate two sucessive items in a list. For example, "100 READ X, Y" and "200 DATA 4, 5".ArrayVariables arranged in the form of lists and tables are also supported in BASIC language. For some applications, vector will be one dimensional array, list, and matrix will be two dimensional array, table. The valid form of a list or table name in BASIC language is any single english alphabet letter in Majuscule forms. A single letter can be used to denote both a simple varible and an array in the same BASIC program, since an array is alway followed by a parenthesis while a simple variable is not the case. And therefore a list and a table can not have the same name in the same BASIC program. For example, A(6), A(2,4). The subscripts inside the parentheses can be any positive integer or any expression. For example A(X), A(X,Y).Arithmetic OperationThe basic mathematical operations, "+ (plus)", " (minus)", "* (times)", "/ (divided by)" and "￪ (to the power)" are supported in BASIC language. These arithmetic operation have the same meaning as used in an ordinary mathematical formula.ExpressionExpression or mathematical expression in BASIC language is an ordinary mathematical formula expressed in form of a single line expression. The fundamental mathematical expression are variables and numbers joined together by basic mathematical operations, "+ (plus)", " (minus)", "* (times)", "/ (divided by)" and "￪ (to the power)". Parentheses can also be used in an expression such that the mathematical expression are processed in correct order. Because the expression grouped inside a parentheses pair is always processed before the parenthesized is returned. Besides the multiplication sign cannot be omitted in an BASIC language expression. For example, 5*A+(7+B*6). Similarly mathematical functions can also be used in a mathematical expression. For example, 5*A+(7+B*SIN(6)).Order of OperationsIn general, the order of operations in an expression is parentheses, function, exponents, multiplication or division, addition or subtraction where parentheses have the highest order of priority. The expressiion inside a pair of parentheses is always computed first. Then the function of the expression is also processed before other arithmetic operations. Arithmetic operations in a mathematical expression are processed from left to right. However, if the arithmetic operation on the right of an arithmetic operation, i.e. multiplication, division, addition, or subtraction, is an exponent, then raising to a power will be processed before computing the original arithmetic operation on the left. Since multiplication and division have the same order of priority, both multiplication and division follow the rule of arithmetic operation and are processed from left to right accordingly. Similarly, if the arithmetic operation on the right of an arithmetic operation, i.e. multiplication, division, addition, or subtraction, is an exponent, then raising to a power will be processed before computing the original arithmetic operation on the left.Birth of BASICBASIC at 50Sources and Referneces
©sideway ID: 131000025 Last Updated: 2/2/2022 Revision: 1 Latest Updated Links

Home_{ 5} Business Management HBR_{ 3} Information Recreation Hobbies_{ 8} Culture Chinese_{ 1097} English_{ 339} Reference_{ 79} Computer Hardware_{ 224} Software Application_{ 213} Digitization_{ 32} Latex_{ 52} Manim_{ 204} KB_{ 1} Numeric_{ 19} Programming Web_{ 289} Unicode_{ 504} HTML_{ 66} CSS_{ 65} SVG_{ 46} ASP.NET_{ 270} OS_{ 429} DeskTop_{ 7} Python_{ 72} Knowledge Mathematics Formulas_{ 8} Algebra_{ 84} Number Theory_{ 206} Trigonometry_{ 31} Geometry_{ 33} Coordinate Geometry_{ 2} Calculus_{ 67} Complex Analysis_{ 21} Engineering Tables_{ 8} Mechanical Mechanics_{ 1} Rigid Bodies Statics_{ 92} Dynamics_{ 37} Fluid_{ 5} Fluid Kinematics_{ 5} Control Process Control_{ 1} Acoustics_{ 19} FiniteElement_{ 2} Natural Sciences Matter_{ 1} Electric_{ 27} Biology_{ 1} Geography_{ 1} 
Copyright © 20002022 Sideway . All rights reserved Disclaimers last modified on 06 September 2019