|
||||||
|
REBOL (the Relative Expression-Based Object Language) is a light, but powerful scripting language.
Right from the moment that a programmer downloads REBOL, it is obvious that REBOL is not like other programming languages. REBOL (which stands for the Relative Expression-Based Object Language and is pronounced as in “rebel without a clause) is not a massive, all encompassing programming language, instead it introduces the idea of the REBOL dialect. These dialects enable a programmer to produce small project specific languages which are perfect for:
It's therefore just a matter of downloading REBOL's GUI (Graphical User Interface) and seeing exactly how flexible it is. Obtaining REBOLThe hardest part of the process of installing REBOL is deciding which version to download. That's because there's:
However, to start with, the basic GUI is more than enough. And downloading it takes a matter of seconds (if that). That's because it's tiny. It's so small that the application developers don't even bother to compress it. Getting Started with REBOLOnce the REBOL executable has been downloaded it should be placed in its own directory. That's because it will create a set of directories and files when it's first run (and that's done by double clicking on it). It will also request user details (as shown in figure 1 at the bottom of this article). At this point it may be useful to be connected to the Internet because REBOL will try to download any access and the user will have access to documentation and example scripts. However, that's not necessary for the programmer to start working with REBOL. A Simple REBOL ScriptThe process for creating a new script is quite simple:
The script is now ready for the obligatory “Hello World” example. Every ROBOL script requires a ROBOL header. This can be empty: REBOL []
Or it may contain more useful information: REBOL [
Title: “A Hello World Example”
Author: “Mark Alexander Bain”
]
The code is very simple: print "Hello World"
wait 0:0:5
This code is run by using Control-E and will:
However, if the programmer closes this script they will find that it doesn't appear in the REBOL Viewtop (the GUI dispplay) – even if they refresh it. Adding a Script to the REBOL ViewtopA script is added to the REBOL's Local section of the Viewtop by editing its index file:
A references for the new script can now be added: file "Hello World" %HelloWorld.r
Once the index file has been saved and closed, and the Viewtop refreshed then the script will be visible to the programmer (as shown in figure 3). They will then be able to run the file (by clicking on it) or edit it (by left clicking on it). And the next stage is, of course, to move on to what REBOL is really good at - creating business rules with its dialects. That's discussed in How to Create a REBOL Dialect.
The copyright of the article A Brief Introduction to REBOL Programming in Computer Programming Languages is owned by Mark Alexander Bain. Permission to republish A Brief Introduction to REBOL Programming in print or online must be granted by the author in writing.
|
||||||
|
|
||||||
|
|
||||||