|
![](/i/fill.gif) |
> Almost every dialect had a strange DATA construct. A DATA statement is
> followed by a comma-separated list of decimal numbers. The READ
> statement fetches the next code into the specified variable. The RESTORE
> command resets to the first DATA statement. If you want to write machine
> code, you invariably have to write a BASIC program such as
>
> 10 FOR X = 1 TO 13
> 20 READ D
> 30 POKE (23874+X), D
> 40 NEXT X
> 50 DATA 45,84,27,45,95,13,75,65,42,84,13,10,59
Think punch cards.
In the case above, you have 4 cards with your program, one line per
card, and can change the DATA card every time you run the program. So
when your warehouse invetory changes, you can still reuse the "Monthly
report" program deck of cards with this month's deck of DATA cards.
Historical note: this is also the reason for the line numbers. It
allowed the deck to be shuffled (ex: after being dropped on the floor)
and read by the computer without having to bother about the order of the
cards.
Of course, on a cassette or a floppy diskette, there is little risk of
dropping your code on the floor and shuffling the data, so eventually
line numbers disappeared.
--
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/* flabreque */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/* @ */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/* gmail.com */}camera{orthographic location<6,1.25,-6>look_at a }
Post a reply to this message
|
![](/i/fill.gif) |