Hello World application


This example is really very simple indeed (also available as a plain ASCII file):

/* This is a fully documented NetRexx program */
say 'Hello World!'

The first line is a comment, which isn't really needed. The second line is a NetRexx instruction called SAY, which takes an expression (here just a constant string) and displays it.

To run the program, you'd create a plain text file containing the two lines above (or just the second line), and then enter the command:

netrexxc -run hello

This would:

  1. Call the NetRexx translator to translate the program from NetRexx to Java
  2. Call the Java compiler (javac) to compile the program into a class file
  3. Call the Java interpreter (java) to interpret the class file, which should then display "Hello World!".

[ NetRexx home page. | IBM home page | Search | Contact IBM | Help | © | tm ]