Prompt_String Anomaly

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

Hello all... In just trying out some simple stuff, I believe I have come
across a bit of strange behaviour with the prompt_string routine defined in
get.e. I wrote a simple number guessing game for my kids a few days ago, and
I noticed that when the input prompt got to the bottom of the screen, I
began to get extra spaces. I have traced it somehow to the prompt_string
routine. For instance, in this simple code:

-------------------
include get.e

object word

for i=1 to 26 do
     object = prompt_string("Enter a word: ")
end for
-------------------

You have a series of 26 prompts for a string. As you would expect, each line
is displayed one after another without any space inbetween, which it does
UNTIL it gets to the bottom of the screen and starts to scroll up. It then
starts to place a blank line between the prompts. For example....

Enter a word: one
Enter a word: two
Enter a word: three
....etc...
Enter a word: twenty-four
Enter a word: twenty-five
                                                     << extra space here
Enter a word: twenty-six

If the program called for more prompts, it would continue to add a blank
line between them for as long as the text was scrolling at the bottom of the
screen. I looked over the prompt_string code but being very new to this
language, I didn't find any obvious answers. You can obviously get around it
a couple of ways, but I was just curious if this had been noticed before and
perhaps wondered if anyone had an explanation as to why it happens.

Thanks in advance,

Scott Henry

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

Search



Quick Links

User menu

Not signed in.

Misc Menu