click

this

ScuzzBlog: Diaries October 2021

Entry 25th October 2021: Post 1: BASIC Origins- No strings attached. Pascal.


BASIC Origins- No strings attached. Pascal.

I had wanted to get my head round Pascal today but finished up
sinking into the history of BASIC. My adventure started when I
researched the history of the 'STRING' in programming and came
up with a big fat zero.... well almost.

First though the origins of BASIC.

Back in 1964 at Dartmouth College in the USA two professors would
change the course of computer development by creating BASIC or to
give it's full name Beginners' All-purpose Symbolic Instruction
Code. BASIC was born out of a terminal sharing project created by
the two professors to give students access to computers across the
whole campus. The original manual is available online at Dartmouth
Edu web site.

No 'string' attached.

There were just 15 statements in the original BASIC but no STRING.
[ The words of Thomas E Kurtz October 26 2005 ]

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

GOTO Does just that, transfers to another line-numbered statement
IF 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

While there is no string data type, quoted strings are allowed in
PRINT statements.

OK on to Pascal.

Pascal was invented in 1970 by Professor Niklaus Wirth of the Federal
Institute of Technology in Zurich, and named after Blaise Pascal,
one of the great mathematicians and philosophers of the seventeenth
century.

Wirth's idea was that Pascal should be used to teach students to
program using fundamental concepts of structure. The language
itself encourages the programmer to think about the structure of
the program before starting to write.

Differences and speed..

There are important differences between Pascal and BASIC apart
from the way in which it is understood by the computer. One of the
disadvantages of BASIC is that it is normally an interpreted language.
This means that as each instruction is met, that instruction has
to be converted into machine code and then executed. So for a single
loop such as:

10 FOR N-1 TO 100
20 PRINT N
30 NEXT N

each statement in the loop is converted into machine code one
hundred times. And with BASIC, the interpreter must remain resident
in memory (usually in ROM) all the time, taking up valuable space.

Pascal on the other hand, is usually a compiled language. When the
program has been written , it (the source code) is translated once
and only once, into machine code ( the object code ). When this has
been done, the compiler is no longer needed.

Anyhoo .... I kinda failed in my efforts to understand Pascal as I
found the origins of BASIC way more interesting. There are plenty
of written guides on line regarding Pascal, which I intend looking
into some day... or not, probably not. I am not a programmer nor
ever am likely to be one. However, I am fascinated by BASIC so I
do intend spending some time on the Dartmouth website as they really
do make everything available for you to study.

There was this obscure little company that dabbled a bit into Pascal.
What was their name?.. Apple, that's it. Their implementation of the
programming language looks very interesting and I have the beast and
the disk to play with. A future project maybe... hmm maybe, dunno.

That's that for today. If anyone can advise of the first origins of
the word STRING in respect of computers I would much appreciate it.

BASIC Origins- No strings attached. Pascal.


scuzz site

If you can only see this CONTENT window
then click the image above for the full site

Last updated 25th October 2021

Chandraise Kingdom

Keep the Faith
scuzzscink 2021