Re: Please help...

new topic     » goto parent     » topic index » view thread      » older message » newer message

echope,

1.  The best way to turn the users input back to what they typed is to
*save* it first before it's turned into uppercase (in case of a mixture of
lower/upper case in input).   So, using Kat's example,

include wildcard.e
keypress = wait_key()
UsersOriginalInput = keypress
UsersInputAsUpperCase =  upper(keypress) -- convert it all to uppercase
if equal(UsersInputAsUpperCase ,"SOMETHING") then whatever end if

You should bear in mind, though, that wait_key() returns *one key*, not a
series of keypresses entered by the user, (unless you loop it and combine
the keypresses), and there is a command which *would* return all of the
users input in one variable, "prompt_string", which also lets you specify
what you might like to be asking the user at that point.

2.  And when you put either the wait_key or prompt_string, together with
upper(keypress),  where you want in your code to process user input, it is
already *only* (and permanently) working in relation to that user input.
Look at the code example:  "upper" is *only* acting on "keypress", nothing
else.

Dan Moyer


----- Original Message -----
From: <echope_ at excite.com>

>
> Ahh... Wildcard.e...
>          OK, thats pretty much it, but how do I turn thinks back to
> normal after using upper()??? And is there a way to make it permenently
> on for what the USERS type ONLY? Not the in-program text and everything?
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu