1. An idea that isn't working

Dear Eu-people

The code below isn't working and I imagine it should. Having
set the rows to 50 why can't I position at 50?

It fails under VirtualPC and under NT4 SP4.

ZB
---------------- test2.exw --------------------

include graphics.e

integer r
r = text_rows( 50 )
position( 50, 1 )

new topic     » topic index » view message » categorize

2. Re: An idea that isn't working

Because the screen starts at 0 so position 50 is actually 49.

Adam Weeden

----- Original Message -----
From: Bruce M. Axtens <zaphod_beeblebrox at SIL.ORG>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Thursday, November 11, 1999 2:17 PM
Subject: An idea that isn't working


> Dear Eu-people
>
> The code below isn't working and I imagine it should. Having
> set the rows to 50 why can't I position at 50?
>
> It fails under VirtualPC and under NT4 SP4.
>
> ZB
> ---------------- test2.exw --------------------
>
> include graphics.e
>
> integer r
> r = text_rows( 50 )
> position( 50, 1 )
>

__________________________________________
NetZero - Defenders of the Free World
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html

new topic     » goto parent     » topic index » view message » categorize

3. Re: An idea that isn't working

Bruce M. Axtens wrote:

> Dear Eu-people
>
> The code below isn't working and I imagine it should. Having
> set the rows to 50 why can't I position at 50?
>
> It fails under VirtualPC and under NT4 SP4.
>
> ZB
> ---------------- test2.exw --------------------
>
> include graphics.e
>
> integer r
> r = text_rows( 50 )
> position( 50, 1 )
>

Adam Weeden wrote:

> Because the screen starts at 0 so position 50 is actually 49.
>
> Adam Weeden

I write:

text_row() is for lines 1 to 50, not 0 to 49.

Try this and it works:
----------------------------------------------------------
include graphics.e
include get.e   -- wait_key()

integer r
r = text_rows( 50 )
position( 50, 1 )

puts(1,"Hello!")-- place this in 50th row...
r = wait_key()  -- wait here to watch the 50-row-screen!
----------------------------------------------------------

Have a nice day, Rolf

new topic     » goto parent     » topic index » view message » categorize

4. Re: An idea that isn't working

Hi Bruce,
now I got the point you mean:

your example will run in the CMD-window of WIN32 as a *.ex-file,
not as a *.exw-file.

This has to do with the opening of a standard DOS-window not
capable of more then 25 rows.

Rob, could you reflect on this point?

Have a nice day, Rolf

new topic     » goto parent     » topic index » view message » categorize

5. Re: An idea that isn't working

Bruce M. Axtens writes:
> The code below isn't working and I imagine it should. Having
> set the rows to 50 why can't I position at 50?
> It fails under VirtualPC and under NT4 SP4.
> ---------------- test2.exw --------------------
>
> include graphics.e
>
> integer r
> r = text_rows( 50 )
> position( 50, 1 )

Euphoria creates a Windows console for your program
whenever you do something that needs one.

In this case, no console existed at the time that you called
text_rows(), so it failed and returned 25.
This is a bug. text_rows() should create a console
if necessary. It will be fixed in the next release.
Meanwhile, you should be able to work around this bug
by doing any of the following before you call text_rows(50):

    * print something to the screen
    * clear_screen()
    * if graphics_mode(3) then
      end if

clear_screen() seems like the simplest fix.
This fixed the problem for me on Win98.
I assume it will work on NT as well.

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu