NetRexx Overview, version 1.148
Copyright (c) IBM Corporation, 1998. All rights reserved. © | 23 Dec 1998 |
[previous | contents | next] |
trace results number=1/7 parse number before '.' after say after'.'beforewould result in the trace:
2 *=* number=1/7 >v> number "0.142857143" 3 *=* parse number before '.' after >v> before "0" >v> after "142857143" 4 *=* say after'.'before >>> "142857143.0"where the lines marked with '*=*' are the instructions in the program, lines with '>v>' show results assigned to local variables, and lines with '>>>' show results of un-named expressions.
Further, trace methods lets you trace the use of all methods in a class, along with the values of the arguments passed to each method. Here's the result of adding trace methods to the Oblong class shown earlier and then running tryOblong:
8 *=* method Oblong(newwidth, newheight) >a> newwidth "5" >a> newheight "3" 26 *=* method print Oblong 5 x 3 20 *=* method relsize(relwidth, relheight)- 21 *-* returns Oblong >a> relwidth "1" >a> relheight "1" 26 *=* method print Oblong 6 x 4 10 *=* method Oblong(newwidth, newheight) >a> newwidth "1" >a> newheight "2" 26 *=* method print Oblong 1 x 2where lines with '>a>' show the names and values of the arguments.
From
The NetRexx Language by
Mike Cowlishaw,