![]() |
The NetRexx Tutorial
![]() |
This book is addressed to both professional programmers and end users who want to learn more about the NetRexx language.
NOTE: The following documentation refers to NetRexx version 1.00 and following.
*** This section is:*** and will be available in next releases
This topic is likely to be a source of endless arguments (both pro and con).
This is my genuine opinion.
PROs:
CONs:
>From the very first chapters, I will present and discuss some 'real' NetRexx program atoms (i.e. code fragments (usually methods) ) that you can use in your programs after having learnt the language.
I have noticed that many 'user guides' present as examples, programs you will probably never use again in your life; in fact these programs are often totally useless, brought into existence only so that the author can show particular features of the language involved.
I prefer to give you something 'real'; program atoms you can insert in your code, or programs you can run and use even after having finished with this book. The obvious disadvantage in such an approach is that some constructs may not be entirely clear, since they will only be explained several chapters further on. Please be patient, and do not be concerned about things that, at a particular point in your progress through the book, are not completely understood. You can always come back to them later.
*** This section is:*** and will be available in next releases
This book is divided into four parts.
Part One (Writing simple programs) - Basic Concepts - Introduction to NetRexx - Language Basics - Operations on Numbers - Operations on Strings - Control Structures Part Two (Object Oriented Programming) - Objects, Classes and Interfaces - Operations on files - Sockets and Networking - System Interface - Threads - Database Operations Part Three (Interfacing with the WEB) - Applets - Graphical Interfaces - Advanced Graphics Part Four (Advanced topics) - Additional Instructions - More on Algorithms - NetRexx for Rexxers - Tools - Miscellaneous
In order to be consistent, a 'standard' is being followed in presenting the various code samples and running examples.
When I show a full program example, the code appears like this:
+----------------------------------------------------------------------+ | /* |01 | * Code example |02 | */ |03 | say |04 | say 'This is a code example' |05 | say |06 | exit 0 |07 +----------------------------------------------------------------------+ codeex.nrx | ![]() |
Line numbers may be used in comments related to the code. You will find the file id at the bottom right-hand corner of the code, making it easier to find the referenced portion of the code if you already have the sample code on your computer.
When referring to only a small piece of a program, the code appears like this:
------------------------------------------------------ if test then do say 'Running in test mode.' end ------------------------------------------------------ if example
Example sessions are presented like this:
.................................................................... rsl3pm1 (201) codeex test rsl3pm1 (202) ls -la codeex -rw-r--r-- 1 marchesi system 50 Jan 24 20:03 codeex rsl3pm1 (203) .................................................................... outex |
What you should type is written in bold characters. The rsl3pm1 (NNN) prompts are simply those of the machine from which sample sessions were taken, so just ignore them.
Syntax examples appear as:
rc = socket('VERSION')
with the method invocation in bold characters, and the arguments in italics.
Data File Samples appear as:
+------------------------------------------------------------------+ | data file | | sample | +------------------------------------------------------------------+ sample.DATA |
with, again, the file id at the bottom right-hand corner.
Several reviewers have helped, by questions and comments, to clarify the aims and exposition of the book. Mark Hessling was extremely helpful in reading the preliminary version of the book, which was typeset using his XEDIT-like text editor; THE.
Many thanks also to Bernard Antoine and David Asbury of the CERN CN division for their help and suggestions.
Let us now make a resume' of what we have seen so far in this chapter.
*** This section is:*** and will be available in next releases