Want to create interactive content? It’s easy in Genially!

Get started free

Dartmouth BASIC

Yna Gabrielle Foronda

Created on February 18, 2023

Start designing with a free template

Discover more than 1500 professional designs like these:

Smart Presentation

Practical Presentation

Essential Presentation

Akihabara Presentation

Pastel Color Presentation

Terrazzo Presentation

Visual Presentation

Transcript

(Dartmouth) BASIC

Programming Language

and bits of modern BASIC versions

GET STARTED

Presenters

Group 1

Home

Search

Joselito Velasco

Artist

Jhon Morete

Artist

Yna Foronda

Artist

Daniel Cedeno

Artist

Mariel Lorena

Artist

Daphne Agao

Artist

Judith Balatinsayo

Artist

Library

Introduction

Components

Statements

Other Information

Topics

Concept & Structure

Concept & Structure

in BASIC

Introduction

to BASIC

Statements

in BASIC

Other Information

of BASICs

of the BASIC

Components

Home

Introduction

Search

Library

Topic 1

Topic 2

Topic 3

Topic 4

Topic 5

1 What is BASIC

3:29

2 History of BASIC

3:53

3 Evolution of BASIC

3:55

Introduction

BASIC

BASIC is one of the simplest high-level programming languages that can be easily learned. BASIC is an acronym of Beginner’s All-purpose Symbolic Instruction Code. Its developers focused on creating a language that novice programmers and students could use. BASIC became simple and easy to use with commands similar to English for beginners. When computers were first developed, they were so complex to operate, and only mathematicians and scientists could program them. To open up computer programming to more people, a simplified programming language was necessary—and that’s how BASIC came into existence. It became so popular after its creation in the 1960s that most of the earliest personal computers utilized it extensively. Over time, BASIC has been widely imitated and altered, and it is currently most well-known as Visual Basic.

What is BASIC

GROUP 1

It was born in 1964 at the Dartmouth college in New Hampshire (USA), where it has been developed by John G. Kemeny and Thomas E. Kurtz. Both began to work on a new simplified programming language, and after the so-called Darsimco or Dartmouth Simplified Code and DOPE or Dartmouth Oversimplified Programming Experiment versions, they turned towards a language with the following specifications: general use, easy to use, extensible, interactive, with a debugging help system, efficient, hardware independent and operating system independent. To do this they started from FORTRAN and ALGOL. The final version was called "Dartmouth BASIC'' and provided 14 instructions. The "Dartmouth BASIC '' was a compiled one and was rather fast for the epoch. The Kemeny and Kurtz efforts were rewarded on May 1st 1964 at 4:00 in the morning, when two BASIC programs simultaneously ran on the General Electric 225 UC of Dartmouth college.

History

BASIC

PUNCH CARD

History

BASIC

1964

Dartmouth BASIC

1983

GW BASIC

1991

Visual BASIC

1971

BASIC Plus

1985

Quick BASIC

Evolution

BASIC

In September, 1963, under the direction of mathematics professors John G. Kemeny and Thomas E. Kurtz, a project to establish a time-sharing system at Dartmouth got under way. The fruits of this project were BASIC, a simplified programming language, and a time-sharing system -- using the GE-225 and Datanet-30 computers. This system began operations in May, 1964. In 1965, Dartmouth placed off-campus terminals in secondary schools in the area. At the same time, other computer installations began to use Dartmouth's system software. The Dartmouth Time Sharing System consists of a large central computer with a number of input-output stations. Individuals using the input-output stations are able to "share" the use of the computer with each other in such a way as to suggest that they each have sole use of the computer. The teletype machines are devices through which the user communicates with the computer. Teletype machines are like ordinary typewriters with certain modifications to make them suitable for transmitting over telephone lines. All letters are capitals and some are modified so as not to be mistaken with numbers like 1 and 0, and there are additional buttons.

DTSS

BASIC

Sample Program

BASIC

- All lines start with a line number that specify order in which statements are to be performed by computer. Before program is run by computer, it sorts out and edits the program, putting statements into the order specified by their line numbers. - After the line number follows an English word that denotes the type of statement - Spaces have no significance in BASIC except in printed strings. Spaces can be used to make the program readable

10 READ A1, A2, A3, A4 15 LET D = A1*A4 - A3*A2 20 IF D=0 THEN 65 30 READ B1, B2 37 LET X1 = (B1*A4 - B2*A2)/D 42 LET X2 = (A1*B2 - A3*B1)/D 55 PRINT X1, X2 60 GO TO 30 65 PRINT "NO UNIQUE SOLUTION" 70 DATA 1, 2, 4 80 DATA 2, -7, 5 85 DATA 1, 3, 4, -7 90 END

Home

Components

Search

Library

Topic 1

Topic 2

Topic 3

Topic 4

Topic 5

1 Basic Elements and Data Types

4:31

2 Numbers, Variables, and Expressions

6:07

3 Keywords and Built-In Functions

3:41

Components

BASIC

Variables: BASIC allows programmers to define variables to hold different types of data, such as numbers and strings. Variables can be declared using the DIM statement and assigned values using the LET statement. Control Structures: BASIC supports various control structures such as if-then statements, for-loops, and while-loops and select-case statements on later versions. These structures allow programmers to control the flow of their programs and execute specific blocks of code based on certain conditions. Input/Output: BASIC supports input/output statements such as PRINT and INPUT, which allow programmers to display information on the screen and receive input from the user. Functions and Subroutines: BASIC allows programmers to create their own functions and subroutines, which can be called from other parts of the program. This helps to modularize the code and make it easier to maintain and debug. Operators: BASIC supports a range of operators including arithmetic operators (+, -, *, /), comparison operators (>, <, =), and for later versions, logical operators (AND, OR, NOT). Keywords: These are reserved words that have a specific meaning in the language and cannot be used as variable names or other identifiers. Comments: Comments are used to provide explanations and documentation within the program. In BASIC, comments can be added using the REM statement.

Basic Elements

BASIC

Integer: This data type represents whole numbers without any fractional parts. In BASIC, integers are typically stored using 2 bytes of memory. Floating point: This data type represents real numbers with decimal points. BASIC uses the single-precision (4 bytes) or double-precision (8 bytes) floating-point format to store floating-point values. String: This data type represents a sequence of characters or text. Strings are stored as arrays of characters, and their length is limited by the amount of memory available. Dartmouth BASIC does not support string values on variables Boolean: This data type represents logical values, which can be either true or false. In BASIC, true is represented by a nonzero value, and false is represented by zero. The original BASIC did not have a separate Boolean data type but logical expressions were evaluated using integer values (0 for 'false' and non-zero values for 'true') Arrays: Arrays are used to store a collection of values of the same data type. In BASIC, arrays can be one-dimensional or multidimensional, and their size is specified during declaration. They are referred to as list (one-dimensional) and table (two-dimensional) in Dartmouth BASIC. Pointers: Pointers are used to store the memory addresses of other variables or data structures. However, BASIC does not support pointers in the traditional sense. The original one did not support pointers as well.

Data Types

BASIC

May contain up to 9 digits with or without decimal point, and possibly a minus sign Example:5 2.5 123456789 .123456789 -123456 To extend the range, a power of ten may be used using E Example: -12.345 is equivalent to -12345E-3 and -.12345E2

Numbers

BASIC

A variable is a named object able to contain a data which can be modified during program execution. Every variable is declared under a unique name which must be a valid identifier. - Variable names are case-insensitive: K and k refer to the same variable. - Variable names may contain numbers, but must begin with English letter. - Numeric variables are initially set to zero by default; string variables are initially set to contain empty string (no symbols) and have length of zero. - Variables are given or assigned values by LET and READ statements. The value assigned will not change until the next time a LET or READ statement is encountered that names that variable. Example:A X N5 X0 K9 O1

Variables

BASIC

Formed by combining variables and numbers together with arithmetic operations and parentheses just as in ordinary mathematic formulas RULES:

  • Expression inside a parentheses pair is computed before the parenthesized quantity is used in further computations
  • Raising to a power is computer before multiply and/or divide, which in turn are computed before addition and/or subtraction, in the absence of parentheses
  • Several multiply-divides, or addition-subtractions are computed from left to right.

Expressions

BASIC

LET Introduces the assignment statement, and is required PRINT Provides free-form output END Is required READ Assigns values to variables from internal data DATA Introduces internal data GO TO Does just that, transfers to another line-numbered statement IF-THEN Gives a conditional GOTO FOR Introduces the looping construct NEXT Terminates the looping construct GOSUB Does a GOTO to a subroutine RETURN Returns from the end of the subroutine DEF Introduces programmer-defined functions DIM Allows dimensioning arrays REM Provides comments STOP Same as reaching the END statement In addition, the slightly more recent version of BASIC that we are using includes the INPUT statement.

Reserved Words

BASIC

ABS The absolute value ATN The arctangent COS The cosine EXP The exponential, i.e., e^x INT The integer part (truncating toward 0) LOG The natural logarithm RND The next random number SIN The sine SQR The square root TAN The tangent

Built-In Functions

BASIC

Home

Statements

Search

Library

Topic 1

Topic 2

Topic 3

Topic 4

Topic 5

1 Assignment statements and Declarations

3:00

2 Conditional and Iteration statements

3:19

3 More Keywords

3:12

Statements

BASIC

Declaration statements Variables are not explicitly declared with a type before they are used. Instead, they are created and type is determined by the value assigned to it. If you assign an integer value to it, then it will be an integer-type variable. Dartmouth does not support string variables yet. It will result in an ILLEGAL FORMULA error. Assignment statements Using the LET keyword and '=' you can assign a value or expression to a variable Syntax for assignment statement: LET <variable> = <expression> or <value> ExamplesLET A = 10 'Assigns 10 to variable A LET C2 = A + 2 'Assigns A + 2 to variable C2

Assignment Statements and Declarations

BASIC

Using DATA: Gives the READ statements values in order of assignment. 10 READ A1, A2, A3, A4 'Gets data from DATA statements 70 DATA 1, 2, 4 'A1=1, A2=2, A3=4 80 DATA 2 'A4=2 90 END Using INPUT: Gets user input. (Only in later versions)10 INPUT A 'Gets integer values 20 INPUT A$ 'Gets string values

Other ways to Input

BASIC

The IF-THEN control statement allows identifying if a certain condition is true, and executes a block of code if it is the case. You can only have one condition per line, so to implement an "else", we use of GOTO. GOTO redirects the flow to the specified line. 15 LET A = 90 20 IF A > 0 THEN 30 25 IF A < 0 THEN 40 30 PRINT "Number is above 0" 35 GO TO 50 40 PRINT "Number is below 0" 45 GOTO 50 50 PRINT "End of program" 60 80

Conditional Statements

BLACKPINK

Using IF-THEN

  1. Assign 0 to X (Initialization of loop)
  2. Increase X by 1 (To progress loop)
  3. Print X and the square root of X (body of loop)
  4. If X is less than or equal to 100, proceed to statement 20 (Provides exit condition)

10 LET X=0 20 LET X=X+1 30 PRINT X, SQR(X) 40 IF X<=100 THEN 20 50 END

Iterations

BLACKPINK

FOR/NEXT loop is a form of flow control that places focus on a single counter. The BASIC syntax is simple - a variable is given a starting value and ending value, and it increments on each pass of the loop: FOR i = 1 TO 10NEXT A more advanced loop includes the STEP parameter, which specifies the value at which the variable is incremented. It can be negative to have the loop decrease the variable instead of increasing it, and may even be fractional. FOR i = 10 TO 1 STEP -1NEXT The FOR loop terminates when the variables pass the final value in the loop. This is checked by determining if it is greater than the second parameter (or less than if STEP is negative.)

Iterations

BLACKPINK

LET <line number> LET <variable> = <expression> A command to the computer to perform computation and assign answer to a variable. READ <line number> READ <list of variables> Causes variables listed to be given in order the next available numbers in the DATA statements. DATA <line number> DATA <list of numbers> Before program is run, computer takes all DATA statements in order in which they appear and creates a large data block. It supplies the next available number each time a READ is encountered. If data block runs out of data, with a READ statement still asking for more, program is assumed done.

All the Keywords

BLACKPINK

PRINT <line number> PRINT <list of expressions to be printed> <line number> PRINT “<any string of characters>" Numerical quantities can be variables or expressions. There may be any number separated by commas, but only five will be printed to a line. Using comma prints the succeeding element to the next print zone. You can mix labels and expressions on the same statement. GO TO <line number> GO TO <line number> Unconditional go-to. Used to interrupt normal sequence of executing statements in increasing order of line numbers.

All the Keywords

BLACKPINK

IF-THEN <line number> IF <expression> <relation> <expression> THEN <line number> Conditional go-to. It provides a way to select one of the two sequences in the program depending on the results.< less than<= less than or equal= equal>= greater than or equal> greater than<> not equal

All the Keywords

BLACKPINK

FOR <line number> FOR <variable> = <expression> TO <expression> <line number> FOR <variable> = <expression> TO <expression> STEP <expression> Omitting the STEP part is equivalent to incrementing the variable by 1 for every NEXT. The step size could be positive or negative. Upon leaving the loop, the program continues with the statement following the next. The variable used during the FOR statement has the value it had during the last iteration. NEXT <line number> NEXT <variable> Increments the variable used in FOR by 1 or by value specified by STEP.

All the Keywords

BLACKPINK

END <line number> END It is required in all programs. It must also be the statement with the highest line number in the program. STOP <line number> STOP Redirects the flow to the END statement DEF <line number> DEF FN<letter> (<variable>) = <expression> Allows user to define programmer-defined functions. The function must be defined within one line only.

All the Keywords

BLACKPINK

GOSUB <line number> GOSUB <line number> Similar to a GOTO but it redirects to a subroutine RETURN <line number> RETURN It returns from the end of the routine to the previous flow. DIM <line number> DIM <letter>(<integer>) <line number> DIM <letter>(<integer>, <integer>) Allocates memory for user-defined size lists or tables. REM <line number> REM <any string of characters> Allows user to add comments

All the Keywords

BLACKPINK

Home

Other Information

Search

Library

Topic 1

Topic 2

Topic 3

Topic 4

Topic 5

1 More about PRINT

3:35

2 Lists, Tables, and Binding Types

2:58

3 Errors and Limitations

2:55

Other Information

BASIC

The PRINT statement permits a greater flexibility for more advanced programmers who wishes to specify a more elaborate output.

  • The teletype line is divided into five zones of fifteen spaces, allowing the printing of up to five number per line. There are three simple rules:
    • A label, in quotes, is printed just as it appears
    • A comma is a signal to move to the next print zone.
    • The end of a PRINT statement signals a new line, unless a comma is the last symbol
  • Each number occupies one zone. Each label occupies a whole number of zones

More about PRINT

BASIC

Additional rules:

  • With no comma between a label and variable name, label and value appear together
  • No more than six significant digits are printed (with exceptions)
  • Any trailing zeros after decimal point are not printed
  • For numbers less than 0.1, X.XXXXX E-Y is used unless it can be printed as a six decimal number.
  • If number is an exact integer, decimal point is not printed. Integers up to nine digits are printed in full.
“,” tells the computer to move to the next zone but “;” tells the computer to move to the beginning of the next multiple of three characters

More about PRINT

BASIC

BASICally, arrays. Lists are one-dimensional and Tables are two-dimensional. Example: A(7) would denote 7th item in list A B(3,7) would denote item in the third row and seventh column of table B

  • The name must be a single letter
  • The subscripts may be any expression as long as they have a non-negative integer value
  • The single letter denoting a list or table name may also be used to denote a simple variable without confusion but cannot be used to denote both a list and table in the same program.

Lists and Tables

BASIC

BASIC provides each list or subscript of a table to run from 0 to 10, inclusive. If user wants a larger size, he can use DIM with integers as argument. DIM can also be used to allocate storage space in very large programs by telling computer to for example only allocate 4 spaces to list S. 10 DIM A(17) 20 DIM B(15, 20), S(3)

Lists and Tables

BASIC

Lists and Tables

BASIC

10 FOR I=1 TO 3 20 READ P(I) 30 NEXT I 40 FOR I=1 TO 3 50 FOR J=1 TO 5 60 READ S(I,J) 70 NEXT J 80 NEXT I 90 FOR J=1 TO 5 100 LET S=0

110 FOR I=1 TO 3 120 LET S=S+P(I)*S(I,J) 130 NEXT I 140 PRINT "TOTAL SALES FOR SALESMAN "J, "$"S 150 NEXT J 200 DATA 1.25, 4.30, 2.50 210 DATA 40, 20, 37, 29, 42 220 DATA 10, 16, 3, 21, 8 230 DATA 35, 47, 29, 16, 33 300 END

In BASIC programming language, there are several types of variable bindings, which include: - Implicit Declaration: Variables in earlier versions of BASIC were frequently implicitly declared based on their first letter. An assumption would be made that a variable beginning with the letter "A" is a numeric variable, while any other letter would be a string variable. In modern BASIC programming, this kind of variable binding is no longer advised or used. - Explicit Declaration: In modern BASIC, variables are explicitly declared using the DIM statement, which specifies the variable name, type, and optionally the size of the array. For example, the statement "DIM A AS INTEGER" declares a variable named A as an integer. - Static Binding: Variables in BASIC can also be statically bound, meaning that their value holds true even when a subroutine or function is called repeatedly. When declaring the variable, the STATIC keyword is used to do this. - Dynamic Binding: The EVAL statement can be used in various versions of BASIC to dynamically bind variables during runtime. This enables the creation of variables whose names won't be known until runtime. Unfortunately, due to security issues, this feature is not generally advised and is not present in all BASIC versions.

Binding Types

BASIC

ILLEGAL CONSTANT The value of a variable is longer than 9 digits. ILLEGAL FORMULA The expression that is calculated is wrong. ILLEGAL RELATION The condition indicated in an IF-THEN is not one of the 6 possible. ILLEGAL LINE NUMBER An attempt has been made to save a line of code of more than 5 digits. ILLEGAL INSTRUCTION One of the 15 available BASIC commands has not been used. VARIABLE ILLEGAL Incorrect variable name. INCORRECT FORMAT Syntax error on the indicated line. END IS NOT LAST The END command is not the last line of the program. NO END INSTRUCTION The program does not end with the END command.

Basic Errors

BASIC

NO DATA A READ command tries to read more values of the available DATA. UNDEFINED FUNCTION An attempt is made to execute an undefined function. UNDEFINED NUMBER A GOTO or IF-THEN command refers to a non-existent line number. PROGRAM TOO LONG The program is too long. TOO MUCH DATA There are too many values in DATA lines. TOO MANY LABELS Total legth of labels exceed limit TOO MANY LOOPS There are more than 26 chained loops. NOT MATCH WITH FOR A NEXT command does not have the corresponding FOR. FOR WITHOUT NEXT A loop does not have NEXT. CUT PROGRAM OR DIMS Attempts are made to create more matrices of available space. SUBSCRIPT ERROR If you refer to an array with a value greater than defined. ILLEGAL RETURN A RETURN command has not been called by a GOSUB.

Basic Errors

BASIC

Length of program In general, about two feet of teletype paper filled with BASIC statements is the max Constants and printed labels Total number of constants and different printed labels must not exceed 175 Data Cannot have more than 300 data numbers Length of printed labels Total length cannot exceed 600 characters FOR statements Cannot have more than 26 FOR statements GO TO and IF-THEN statements Total number of statements combined cannot exceed 80 Lists and tables Total number of elements in all lists and tables combine cannot exceed 1500

Limitations

BASIC

Home

Search

Concept & Structure

Library

Topic 1

Topic 2

Topic 3

Topic 4

Topic 5

1 Data Structures and Function

3:16

2 Garbage Collection

2:47

3 Time Sharing System and Error debugging

2:47

Concept & Structure

Dartmouth BASIC

Arrays: Collection of variables of the same type sorted under a single name, each variable identified by an index, specifying their position. To create: DIM <array_name>(<array_size_1st_dim>, <array_size_2nd_dim>, ...) To access: <array_name>(<array_index_1st_dim>,...) Example: DIM A(10) 'Array of index A(0) to A(10); 11 integers Other data structures: While the original version of BASIC did not include support for more advanced data structures like linked lists or trees, modern versions of BASIC like Visual Basic and .NET languages like VB.NET and C# do include support for more advanced data structures like lists, dictionaries, and sets. These data structures provide more powerful ways to organize and manipulate data in programs.

Data Structures

BASIC

The user may define up to 26 new functions, giving them names from FNA to FNZ. Each such function is introduced by the DEF keyword. There must be exactly be one argument. The variable name used as an argument is distinct from the variable with the same name in the rest of the program. To define: DEF FNX(X) = <expression> The expression should contain an X unless the function value does not depend upon an argument; the expression may contain other variables from the program. DEF statement may appear anywhere in the program before the END statement.

Functions

BASIC

100 REM PLOT A NORMAL DISTRIBUTION CURVE 120 DEF FNN(X) = EXP(-(X^2/2))/SQR(2*3.14159265) 140 FOR X = -2 TO 2 STEP .1 150 LET Y = FNN(X) 160 LET Y = INT(100*Y) 170 FOR Z = 1 TO Y 180 PRINT " "; 190 NEXT Z 200 PRINT "*" 210 NEXT X 220 END

Flexibility is provided in BASIC by three statements that permit the use of user-defined functions and subroutines. DEF

  • Permits user to define a function other than the standard functions. The name must be three letters, first two are FN. The user may thus define up to 26 functions.
Ex: 25 DEF FNF(Z) = SIN(Z*P)
  • May occur anywhere in the program.
  • Variable used must not be subscripted and that is used every time that function is used.
  • RHS can be any expression that can fit in only one line and can use other variables.
GOSUB and RETURN The effect is exactly the same as GOTO except that note is taken by the computer as to where the GOSUB is in the program. As soon as RETURN is encountered, computer goes back to statement following the GOSUB

Functions

BASIC

Dartmouth BASIC does not have built-in support for garbage collection. Instead, memory management is the responsibility of the programmer. One common technique for managing memory in BASIC is to use dynamic memory allocation, which involves requesting and releasing memory at runtime as needed. Another approach is to use static memory allocation, which involves allocating memory for variables at compile time. Modern BASIC dialects have often used garbage collection for variable-length data types, such as strings and lists, so as not to burden programmers with memory management details. On the Altair 8800, programs with many string variables and little string space could cause long pauses due to garbage collection. Similarly, Applesoft BASIC interpreter’s garbage collection algorithm repeatedly scans the collection algorithm repeatedly scans the string having the highest address in order to compact it toward high memory, resulting in O(n2) performance and pauses anywhere from a few seconds to a few minutes. A replacement garbage collector for Applesoft BASIC by Randy Wigginton identifiers a group of strings in every pass over the heap, reducing collection time dramatically. BASIC.System, released with ProDOS in 1983, provides a windowing garbage collector for BASIC that is many times faster.

Garbage Collection

BASIC

The Dartmouth Time Sharing System consists of a large central computer with a number of input-output stations (currently, model 35 teletype machines). Individuals using the input-output stations are able to “share” the use of the computer with each other in such a way as to suggest that they each have sole use of computer. The teletype machines are the devices through which the user communicates with the computer.

Use of the Time Sharing System

BASIC

The Teletype Machine

  • Are like ordinary typewriters, with certain modifications to make them suitable for transmitting messages over telephone lines.
  • Have a nearly standard keyboard for letters and numbers with the most notable differences being that all letters are capitals and number one is not the same as the letter L.
  • There are also special characters which can be typed using either of the two “SHIFT” keys, which includes the following symbols:+ - * / ^ = space ( ) < > . , ;
  • There are additional special keys: RETURN, <- (backspace), ALT MODE
  • Besides the keyboard, there are buttons used to operate the teletype machine: ORIG (on), CLR(off), LOC LF, BUZ-RLS

Use of the Time Sharing System

BASIC

Using the Teletype

  1. Type HELLO then press RETURN to start the question and answer that serve to tell the computer who you are and what you wish to do.
  2. Enter your user number, name of the language, NEW or OLD (a new program or retrieve an old program), name of your problem.
  3. Once the computer outputs ready, you can now start your program. Remember that each statement should start with a line number: - Cannot contain more than five digits - No spaces or non-digit characters
4. Type RUN to execute your program

Use of the Time Sharing System

BASIC

System Commands

STOP Computer stops whatever it is doing even if it is typing outLIST Types out complete listing of the programLIST-XXXXX Types out listing of program from line XXXXXSAVE Saves the program being editedUNSAVE Destroys the saved program, making room for other saved programsCATALOG Lists the names of all programs saved by userNEW Start a new problemOLD Retrieves a saved programSCRATCH Erases previous work and presents a clean slateRENAME Supply a new problem name to current work

Use of the Time Sharing System

BASIC

There are two types of errors

  • Errors of form or grammatical errors: This will cause error messages to be printed out instead of the expected answers.
  • Logical errors: Often harder to uncover
There are three kinds of corrections that can be made:
  • Changing a line: Type it correctly with the same line number
  • Inserting a line: Type it with a line number between those of two existing lines
  • Deleting a line: Type the line number only
Being able to insert a line requires that the original line numbers are not consecutive numbers. For this reason, most users will start out using line numbers that are multiples of five or so. These corrections can be made anytime, either before or after a run.

Error Debugging

BASIC

QUIZ

Home

Search

  1. Who are the two professors that created Dartmouth BASIC?
  2. What does DTSS stand for?
  3. TRUE or FALSE: Identifiers names in BASIC are case sensitive.
  4. How many user-defined functions can you specify in Dartmouth BASIC?
  5. What reserved word allows you to comment a line in BASIC?
  6. You can raise a value to a power using which symbol?
  7. What keyword feeds value to the READ statements?
  8. Explain how you can iterate through a loop by decreasing the loop counter instead of increasing it.
  9. What does this line of code do? “30 IF N > 10 THEN GOTO 40”
  10. TRUE or FALSE: Dartmouth BASIC does not support Object-Oriented Programming Concepts.
  11. Write a line of code that will create an array with an array index of 0-15.
  12. What keyword do we use to define a function?

Library

Topic 1

Topic 2

Topic 3

Topic 4

Topic 5

Ini

Various Artists

Home

Sources

Search

Library

Topic 1

Topic 2

# TITLE

DATE ADDED

Topic 3

Feb 16, 2023 Feb 16, 2023 Feb 16, 2023 Feb 16, 2023 Feb 16, 2023 Feb 16, 2023 Feb 16, 2023

1 https://history-computer.com/basic-programming-language-guide/ 2 https://www.q7basic.org/History%20of%20BASIC.pdf 3 http://www.hoist-point.com/applesoft_basic_tutorial.htm#getting_started 4 https://www.dartmouth.edu/basicfifty/basicmanual_1964.pdf 5 http://bitsavers.trailing-edge.com/pdf/dartmouth/BASIC_Oct64.pdf 6 Basic Handbook 2nd Edition 1981 by CompuSoft Publishing 7 https://en.wikibooks.org/wiki/BASIC_Programming 8 https://www.dartmouth.edu/basicfifty/commands.html

Topic 4

Topic 5