The First programmer: Augusta Ada Lovelace
Augusta Ada Lovelace
(The First Programmer)
Daughter of the Poet Lord Byron
The Subroutines
A subroutine is a part of a program that can be used repeatedly. An example of routine is a sequence of instructions that sorts numbers into ascending order.
The Loop
A loop is a sequence of repeating instructions. A loop works by means of a command that tells the computer to back up to a previous command, as in the following sequence, which loops endlessly, printing numbers from 0 to infinity by increments of 1:
10 LET N = 0
20 PRINT N
30 LET N = N +1
40 GO TO 20
The Conditional Structure
A conditional jump is an instruction that tells the computer to go to a different instruction if a certain condition is met. The conditional jump has many uses in programming. For example, it can be used to keep a loop from repeating endlessly, as in the following set of instruction, which prints numbers from 0 to 9 by increment of 1:
10 LET N = 0
20 PRINT N
30 LET N = N +1
40 IF N<= 9 GO TO 20
50 END

Comments
Post a Comment