August 12, 2020

AMIGA AREXX PDF

2 About ARexx Programs. Running ARexx Programs; Using ARexx Interactively. 3 Program Examples. Program 1. A function is a program or group of statements that is executed whenever that function name is called in a particular context. A function may be. NAME. Amiga::ARexx – Perl extension for ARexx support. ABSTRACT. This a perl class / module to enable you to use ARexx with your.

Author: Shalabar Maugul
Country: Malaysia
Language: English (Spanish)
Genre: Automotive
Published (Last): 22 June 2007
Pages: 307
PDF File Size: 5.80 Mb
ePub File Size: 4.11 Mb
ISBN: 577-5-59473-854-6
Downloads: 81928
Price: Free* [*Free Regsitration Required]
Uploader: Samugore

Amiga Basic was deprecated by the release of AmigaOS 2.

Both due to compability problems with the OS, but also because Amiga Basic pulled some trick that made it impossible to get working on bit CPUs. I assume that Microsoft could’ve fixed that problem but we can assume that the partnership between Commodore and Microsoft went cold, and that made Commodore to implement their aredx version of IBM Rexx to the Amiga.

Arexx is an intepreted language just like Amiga Basic, but the focus is quite different. Where Amiga Basic was a language you could use to write small applications and games, Arexx is a tool for automation.

That is exactly srexx different these languages are to each other. Before you start writing code and execute programs you need to start the Arexx intepreter. You do this by opening SYS: If you want Arexx to be a part of your day-to-day amuga cycle, you can add this to user-startup.

Amiga User Interface Style Guide

I’m using the micro emacs MEMACS that comes with the Amiga to arecx Arexx files, but I’m sure there is a better editor out there that will provide syntax highlighting and other tooling. Aarexx first program is as usual Hello Worldand already at this small and simple program we have a few caveats we need to deal with. The first is that every Arexx source amiiga needs to start with a comment, or the RexxMast intepretator will not recognize this as a program. When you use the SAY command in Amiga Basic, it will invoke the Amiga speech synthesizer and audibly speak the words through the audio interface.

This will look for a HelloWorld. If it can’t find a matching script file there, it will instead look in the current working directory. If you specify an icon for your Arexx program you can also specify default tool as SYS: Rx will start RexxMast if it’s not already started making these scripts quite suitable for tasks like “Harddrive installation” where the user wmiga want to click an icon and have the program installed for them.

  CDA 9886R PDF

In Arexx variables are not declared as in Amiga Basic. Instead, variables are just used, and will be garbage collected when they fall out of scope. This is a huge step forward from Amiga Basic. Arexx has loops and conditional statements like any other language but they look a bit different.

The DO statement is in the center of looping, and you can use it in different ways to achieve what you want. RANDOM will give you a random number between low and high arguments, but it will not work with a high argument more than If you want ardxx random generate a number higher than you need to use the RANDU function that returns a random float between A wierd aspect of the previous sample arexx that I never specify if the guess I pull from the user is an integer of a amigx.

Types in Arexx is a bit javascripty in that sense.

Here is a short program to demonstrate what seven is or not is. Let’s see what the output is.

AmigaOS Manual: ARexx Getting Started

This means that “7” is exactly equal to 7 and also equal to 7. A tiny bit confusing perhaps. DO is the framework for looping constructs, so you use it also to create a traditional FOR-loop. This program will paint a pyramid on the screen. We use the operator to concatenate strings.

This is called an abuttal concatenation, which is a first one for me. Arexx has built-in functions for string manipulations as getting substrings, padding strings and retrieving ascii values. Arexx has something called compund variables that works a little like javascript. You can without declaring anything write something looking like this. And it will work just fine.

AmigaOS Manual: ARexx

The field is called days and it has a tail called monday. You can have several levels of tails. If you instead of writing an identifier for tail, you use a number, you can index into a compound variable as if it were an array.

  MAC OS X 10.6 SNOW LEOPARD MANUAL IMPRESCINDIBLE PDF

The exciting thing here is that we’re using numbers as tail, and instead of writing fibonacci. This makes for some really readable code.

But if you take a close look it looks more like a GOTO statement than anything else. The variables from the main program is shared with the procedures. When we use the keyword procedure the scope of the subroutine becomes private and it can no longer access fields defined outside of its scope. We can go around this by exposing fields in a whitelist that we want accessible from inside the procedure. What defines a function in Arexx is that it returns a value, and you need to take care of that value.

In Arexx there is a clipboard that you can use to communicate between processes. When starting out writing this tutorial I had a small distaste of Arexx from previous attempts at understanding the language.

As a young boy I never managed to get an Arexx program to run, because I thought the introduction aamiga was only ceremonial and could be skipped. It surely is one strange feature that you require all programs to start with a comment, but when I come to think of it, it might not be such a bad idea.

When working with the language you start to sense that everything is very losely coupled, where you don’t need to define qrexx variables or their types. Actually the Arexx manual goes to the length of declaring that there is not types, but I ran into some troubles when I wanted to do mathematical aimga and the underlying type were string.

I can sense that this is a truely productivity language where you can get easy things done fast. A,iga write your scripts to automate what you otherwise would do manually in Workbench, and it work very well for that. So for automation this is a nice language to work with. I would not want to create something bigger and more complicated as the language doesn’t support modules or namespacing. You can import external libraries but these needs all to be specially designed for Arexx.