Wally Dug's Guide to ARexxII

Wally Dug's Guide to ARexxII

This month, Wally Dug lifts the lid on a brand new program control language for the Amiga

Welcome to another of my famous Guides. Last month, I spilled the beans about the future Amigas, thanks to the conclusion of my ten year Non-Disclosure Agreement with Commodore, and hinted at the possibility of a new language for the Amiga, ARexxII.

Well, since then, both Jeff and I have been inundated with telephone calls from anxious readers, mostly worried about compatibility problems with ARexx, itself a "new" language thanks to it's inclusion with Workbench 2.0.

However, have no fear! Thanks to my friend Shug McGlumpher at Commodore HQ, I have received a pre-release version of ARexxII for the purposes of "bug testing". Yes folks, JAM once again has a world exclusive of the latest Commodore offerings.

 

Compatibility

First of all, I have some bad news. As it stands at the moment, ARexxII is not compatible with ARexx as ARexxII uses some brand new commands as well as updated ARexx commands. However, I have been assured by Shug that it is a simple matter to remove the out of date code from the original ARexx and add the remaining code to ARexxII.

 

Editor

One of the great new features is ARexxIIEd which is a magnificent full-blown word processor, never mind text editor.

ARexxIIEdARexxIIEd has the ability not only to load in documents from different word processors such as Wordworth, Protext, KindWords and Scribble!, but also to save documents in these formats. So, for example, if you wanted to convert all of your Protext files to KindWords format (don't ask me why, though), it can be done through ARexxIIEd by loading as Protext and saving immediately as KindWords. Up to 99 scripts can be open at any one time, memory permitting. Nae problem tae the wee man!

Other aspects of ARexxIIEd include justification (left, right, centre or full), margins, setting of styles (plain, bold, italic, etc.) and the ability to print out documents, er, I mean scripts, with a high level of control. With the ARexxIIEd Config program, you can configure ARexxIIEd to whatever screen mode you want, what colours and font you use, how often you wish to auto-save each docum, er, script, etc.

The most exciting aspect, however, is the Update feature.

 

Boiling-hot links

The Update feature is very similar to HotLinks and with it being present in ARexxIIEd, it means that you can edit your script and then run it without having to save it or leave the editor, thus allowing you to test your script as you go along.

Despite the Update which, by its very nature, does tend to slow things down, ARexxII still seems much faster than ARexx ever did. In fact, you almost forget that its an interpreted language. I would love to see an ARexxII without the Update feature present!

 

Parlez-vous Espanol?

Another improvement, but one which I think is more gimmicky than anything else, is that by a clever piece of code which checks which keymap you are using, you can program in your own native tongue rather than the programmer's. In other words, if we were using the usa1 keymap and loaded our ARexxII paint program, we might have a command "center color"; if we switched to our gb keymap, it would become "centre colour" and so on.

 

ARexxII functions

I mentioned earlier that ARexxII was incompatible with ARexx due to some new commands. Many people found the SAY command rather misleading - it is just like a PRINT in Basic. This has now been rectified with the SAY TO x command.

Options after SAY include SCREEN (i.e. the old SAY command), PRINTER, FILE and SPEAK, the last option doing exactly what the AmigaDOS SPEAK: device does.

Other new commands include the COLOUR (also COLOR, COLUER, etc.) command with which you can change any of the colours using the normal 0-15 RGB values and FONT which changes the font for your script. If the required font cannot be found in your FONTS: directory, ARexxII will automatically use the default Topaz 8 or 9 font.

One new item which will be of great benefit is the Function commands. These allow direct access to the AmigaDOS libraries in a very easy to use format:

WINDOW <number>,[size],[name],[attribute code],[smallest size], [largest size]

This will open either a default window or a window as specified by the user. Don't worry about not knowing the attribute codes as they are all in the manual.

Manual?

Yes! At last! Commodore are to issue an ARexxII manual with every single copy of ARexxII and, rather than write it themselves, it has been written by William G Scharwzindoffler III.
William G Who? I don't know either, but he is very big in the States, apparently in more ways than one.

One thing I did get wrong last month was the release date. Commodore are said to be so happy with the progress made on ARexxII that they are going to ship it whenever it is ready, with possibly a free upgrade to all registered owners of an Amiga in the States.

I'll leave you with some tried and tested ARexxII sample scripts.

 

Listing 1

/* Hello World
   Copyright © Wally Dug Multimedia 1992
*/

SAY TO SPEAK AND SCREEN "Hello, world."
EXIT 0

 

Listing 2

/* Question Time
   Copyright © Wally Dug Multimedia 1992
*/

SAY TO SCREEN
PULL "Please enter your name..."name
PULL "...and your age..."age
PULL "...and your sex. "sex
SAY TO SCREEN
IF sex="M" THEN
   IF age>18 THEN
      SAY TO SPEAK ?"Fancy going down the pub then, "name
   ELSE
      SAY TO SPEAK ?"Fancy going down the cafeteria then, "name
   END
ELSE
IF sex="F" THEN
   IF age>18 THEN
      SAY TO SPEAK ?"Fancy going up the dancing, "name
   ELSE
      SAY TO SPEAK ?"Fancy going to the flicks, "name
   END
ELSE
   SAY TO SPEAK !"You are so thick, "name
IF LAST JUMP START
END
EXIT 0

 

Listing 3

/* Windows
   An example of the new ARexxII FUNCTION commands
   Copyright © Wally Dug Multimedia 1992
*/

COLOUR 0,0,0,0
COLOUR 1,15,0,0
COLOUR 2,0,15,0
COLOUR 3,0,0,15
COLOUR 3
WINDOW 1,100,100,300,100,"ARexxII Window Function",16,,
COLOUR 1
SAY TO SCREEN "I can write in RED..."
COLOUR 2
SAY TO SCREEN "...or in GREEN or even in..."
COLOUR 3
SAY TO SCREEN "...BLUE in my window!"
COLOUR 0
BOX (2,1) CENTRE
COLOUR 1
BOX 1,1,"Again"
BOX 2,1,"Quit"
PULL BOX question
DO WHEN BOX
   question=1,1
      JUMP START
   question=1,2
      JUMP END
EXIT 0

 

Next month, I'll bring you more exclusive news of Workbench 3.0 in "Wally Dug's Build-It! Guide to Einstein's Theory of Relativity".

Now, do you want to go back to the Article Index or go to the next article?

Copyright © Wally Dug Multimedia 1998