Re: strange bug

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

jacques deschĂȘnes wrote:
> here a sample code to demonstrate the bug.
> }}}
<eucode>
> --testing
> 
> function input_line()
> integer c
> sequence line
>    line = ""
>    c = get_key()
>    while c != 13 do
>      if c >= 32 and c<=256 then
>        line &= c
>        puts(1,c)
>      end if
>      c = get_key()
>    end while
>    puts(1,'\n')
>    return line&'\n'
> end function
> 
> sequence iline
> iline = input_line()
> while length(iline)>1 do
>   puts(1,iline)
>   iline = input_line()
> end while
> </eucode>
{{{

> 
> if executed as exwc  test_input.exw, it works fine.
> translate it to C and run the executable.
> Then one have to press <ENTER> two times to complete to exit input_line()

That's a known bug when you translate and compile with Borland (or Lcc).

 From my old rough notes (which I should really add to SourceForge):

  "Things compiled by Borland (or Lcc):
   get_key() requires an extra keypress (even Shift key is enough)
   before it responds to the first keystroke.
   gets(0) and getc(0) seem ok."

I don't know how to fix it. 
Maybe someone can read the Euphoria source and figure this out.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu