1. Re: Why doesn't this work?
>I am trying to improve a program that prompts for values for a, b,
>c...l.
>
>I tried to use the input function, but that didn't work. So I
>returned to the basics. This is what I have.
>
>clear_screen()
>sequence prompt
>atom prompt_loop
>prompt = {97,98,99,100,101,102,103,104,105,106,107,108}
>for prompt_loop = 1 to 12
>print(1,prompt[prompt_loop])
>end for
>abort
>
>it should print abcdefghijkl. No, that's wrong. It should print
>979899100101102103104... but its not even doing that. It says I'm
>redefining something. My logic seems OK. What's wrong?
This code should work:
clear_screen()
for i = 'a' to 'l' do -- 'a' = 97. i is automatically delcared
puts(1, "Value of i: " & i & "\n") -- Display ASCII version of i
end for -- i's scope ends here. You won't be able to access it
_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]