Re: Why doesn't this work?

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

At 07:55 PM 5/27/98 -0400, I wrote:
>
1>include input.e
2>constant prompt = {'a','b','c','d','e','f','g','h','i','j','k','l'}
3>sequence values
4>         values = repeat(0,12)
5>
6>clear_screen()
7>for i = 1 to length(prompt) do
8>  values[i] = input("Enter a value for: " & prompt[i] &" \n")
9>end for


line 1 could be better written as:
 constant prompt = "abcdefghijkl"

And it is a good idea to use length(prompt) rather than 12.
Suppose you later want to add "mnop"? You'd have to change
your loop code.

Irv

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

Search



Quick Links

User menu

Not signed in.

Misc Menu