Something weird

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

--------------3DBBF0EFDD7E3C1219761B7E

I was writing this simple program that had the user input a word, and
then the program searched a list of 200 words to find a match.  It then
printed out on screen whether the word (or part of the word) was found
or not, what number the word was in the sequence, etc.  Simple stuff,
yes, not meant for use other to see how match() worked, and how fast.

Anyway, for some reason when the cursor got to the bottom of the screen,
replies from the program tacked an extra line feed on. When I took the
"\n" out of the beginning of my output, the program still tacked a LF
on, but not a carriage return.  Example:

         prog output       user input      output
    What is the word? stop
                                        That was word# 175.

So I put in a get_position() to take care of it.  If the row was 25,
then the program did not output a LF, but it did put in a CR, or ASCII
13.

All of this is no big deal, but I ask, why would Euphoria do this?  I
put a trace(1) in and saw nothing in my code that would cause this.

Thanks!!
Kevin

--------------3DBBF0EFDD7E3C1219761B7E

<HTML>
I was writing this simple program that had the user input a word, and then
the program searched a list of 200 words to find a match.&nbsp; It then
printed out on screen whether the word (or part of the word) was found
or not, what number the word was in the sequence, etc.&nbsp; Simple stuff,
yes, not meant for use other to see how match() worked, and how fast.

<P>Anyway, for some reason when the cursor got to the bottom of the screen,
replies from the program tacked an extra line feed on. When I took the
"\n" out of the beginning of my output, the program still tacked a LF on,
but not a carriage return.&nbsp; Example:
<BR>&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <U>prog
 output</U>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<U>user input</U>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <U>output</U>
<BR>&nbsp;&nbsp;&nbsp; What is the word? stop
 p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
 ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
That was word# 175.

<P>So I put in a get_position() to take care of it.&nbsp; If the row was
25, then the program did not output a LF, but it did put in a CR, or ASCII
13.

<P>All of this is no big deal, but I ask, why would Euphoria do this?&nbsp;
I put a trace(1) in and saw nothing in my code that would cause this.

<P>Thanks!!
<BR>Kevin</HTML>

--------------3DBBF0EFDD7E3C1219761B7E--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu