Hi forum,
I'm beginning my explorations of HLA using Hyde's book.
Getting aquainted with some of the basic control structures I'm getting double postings with stdout.put using this code snippet:
repeat
stdout.put("Is this OK? [y/n]", nl);
stdin.get(svar);
until(svar == 'y' || svar == 'n');
//Output:
//Is this OK? [y/n]
//Is this OK? [y/n]g
//Is this OK? [y/n]
//Is this OK? [y/n]e
//Is this OK? [y/n]
//Is this OK? [y/n]y
//(continiues code execution when entering 'y')
btw I'm on OSX 10.6.4, using HLA version 2.13 build 4166
it's reading the enter as another character, try flushing the input after the stdin.get(svar).
stdin.flushInput();
this will clear pending characters in the input stream.
Ah, I see. Thanks so much for your help!