Peter Z wrote:
> I'm having real problems reading user input, I hope someone can help.
>
> I'm trying to read in a number from the user - could be one or two
> digits - and choose an action based on that number. If I use
> readline, the result is always enclosed in square brackets, so my
> comparisons are always returning false. Any ideas? Either for an
> alternative input method, or a way of breaking the result out of the [
> ].
readline returns a list. normal list operators apply.
====
lvars some = readline();
if not(listlength(some) = 2) then
;;; code to retry
endif;
lvars
first = some(1),
second = some(2);
;;; do stuff with first and second
====
dave.
--
=================================================
The future of HTML mail is clearly > /dev/null.
=================================================
Two of the most famous products of Berkeley are
LSD and Unix. I don t think that is a coincidence
=================================================
|