Re: Why doesn't this work?
- Posted by "Bonn Ortloff (\"LEVIATHAN\")" <ortlofffamily at WORLDNET.ATT.NET> May 27, 1998
- 804 views
Alan Tu wrote: > 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? > > --Alan Okay, I see what's wrong. pull out the "atom prompt_loop" and put a do after the for line. clear_screen() sequence prompt prompt = {97,98,99,100,101,102,103,104,105,106,107,108} for a_loop = 1 to 12 do print(1, prompt[a_loop]) end for