If there are such arguments at or after the cursor, pressing the confirm key in the editor (Jog Dial on UIQ) gets a different meaning: it selects the entire argument, thus allowing to:
|
use graph as g for i=1 to 10 do if g.text(10, 15*i, "i="+i) end |
Invoking help with the cursor after "if" will display the following help screen:
![]() | ![]() | |
Pressing →Use inserts this skeleton into the code. Note that the first argument «expr» is already selected, so you can immediately replace it: type i%2=1, then press confirm to select «statements». Replace it by typing g.pen(g.red), maybe using help again.
![]() | ![]() | |
Pressing confirm again selects the entire "elsif" clause. We don't need it, so press the delete key.
Pressing confirm again selects the entire "else" clause. We want it to select a different color if i%2#1, so press confirm to just remove the quotes. This also selects «statements». Replace it by g.pen(g.green).
The final code now looks as follows:
|
use graph as g for i=1 to 10 do if i%2=1 then g.pen(g.red) else g.pen(g.green) end; g.text(10, 15*i, "i="+i) end |
It is a good idea to practice a little bit with the help system, in particular with the argument selection feature. Also, browsing through the default help gives you an overview of the language constructs supported by help.