This code gives an error when run on VMEmulator:
/** Prints i starting at the cursor location, and advances the
* cursor appropriately. */
function void printInt(int i) {
var String s ;
let s = String.new(8);
do Output.printString(s.setInt(i));
return;
}
When i changed the code to :
/** Prints i starting at the cursor location, and advances the
* cursor appropriately. */
function void printInt(int i) {
var String s ;
let s = String.new(8);
do s.setInt(i);
do Output.printString(s);
return;
}
it runs perfectly.
What is wrong with the invocation "Output.printString(s.setInt(i))" ?
--Chrit