1. Prompt_String Anomaly
- Posted by Scott Henry <shenry at TCON.NET> Jul 08, 2000
- 433 views
- Last edited Jul 09, 2000
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
2. Re: Prompt_String Anomaly
- Posted by Robert Craig <rds at ATTCANADA.NET> Jul 09, 2000
- 423 views
Scott Henry writes: > I noticed that when the input prompt got to the > bottom of the screen, I began to get extra spaces. This is a known problem. DOS does this for some reason. It's not a "feature" built in to Euphoria. I might be able to correct it with some kludgy code, but I'll probably just leave it as is. If you care about the precise positioning of the cursor you should use position() before printing the prompt string. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com