Programs?

 

Issue 19

Jan/Feb 86

Next Article >>

<< Prev Article

 

 

What do you do with an ST that comes only with Logo, if you don't know anything about Logo? Play around is the answer and you may like to load up Logo and type in these snippets.

First we have BOB which shows a most strange set of characters actually built into the character set of the ST. Anyone you recognise?

TO BOB
TYPE CHAR 28 TYPE CHAR 29 

TYPE CHAR 30 TYPE CHAR 31 

BOB
END

Once typed in, you will get the message 'BOB defined'. Open up the dialog window to full screen and type BOB [RETURN].

Now try SQUARES (a much longer programming exercise, wow!)

TO SQUARES :SIDE

FD :SIDE RIGHT 90

MAKE "SIDE :SIDE+2

IF :SIDE>80 [REV 1] 

SQUARES :SIDE 

END

 

TO REV :ADD
MAKE "SIDE :SIDE - 2
BACK :SIDE LEFT 90
IF :SIDE<1 [MAKE "ADD :ADD+1 SQUARES :ADD]
REV :SIDE
END

When you have typed it you will get the messages SQUARES defined and REV defined. Type SQUARES 4 [RETURN] and watch. Try changing the line colour and background colour on the Settings. Typing CS will clear the screen and activate your revised colours.

At least it's something to type in, but surely you can do better? Any demos would be welcome.

top