POV-Ray : Newsgroups : povray.off-topic : I'm in the mood for monads : Re: Living in a box Server Time
29 Jul 2024 10:23:12 EDT (-0400)
  Re: Living in a box  
From: Warp
Date: 25 Apr 2012 17:18:27
Message: <4f986a23@news.povray.org>
Orchid Win7 v1 <voi### [at] devnull> wrote:
> In a similar was, AMOS BASIC has local variables, named functions and 
> procedures, separate compilation, and a whole chock-load of features. In 
> fact, so many features that it hardly counts as "BASIC" any more; it's 
> more like a brand new language with a superficial resemblance to BASIC...

  If I recall correctly, the original BASIC, and the vast majority of
clones for a pretty long time, didn't even have the concept of a function.
They had subroutines (the most typical keyword to jump to one being GOSUB)
which were just slightly fancier GOTO labels.

  Every single variable was global, of course. (No such thing as a variable
local to a subroutine.)

  And forget about modules and separate source files for subroutines.
The whole program was always in one single file. (Heck, even the concept
of "file" was not really well-defined in the age of punch cards and magnetic
tapes.)

  The only control structure other than GOTO was an IF (and you were lucky
if your brand of BASIC supported an ELSE branch.) Anything that couldn't be
done with IF had to be done with GOTO.

  And the language was completely untyped, of course. Typically you could
have two types: An integral (usually floating point) and a string. That's
about it. Some variants possibly supported some kind of array or enumeration
structure. Forget about creating your own types or data containers.

  Also, originally every single line was numbered. Typically the line numbers
were in increments of 10 so that you could add additional lines between two
existing lines. If you kept adding lines between two existing lines, you
would eventually run out of line numbers and you were stuck, and would have
to start re-numbering lines manually. (The fanciest BASIC editors had a way
of re-numbering the whole program to be once again in increments of 10. Of
course this messed up any numbering scheme you might have had, eg. subroutine
1 starting from line 1000, subroutine 2 starting from line 2000 and so on.
The automatic re-numbering would just make every line number be 10 apart
from each other.)

  More modern BASIC variants got rid of mandatory line numbers, and started
supporting named labels as well as actual functions, arrays, dividing the
program into several source files, new control structures, and other fancy
stuff.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.