[fpc-pascal]CRT unit

Andreas K. Foerster AKFoerster at nikocity.de
Fri Aug 3 16:16:29 CEST 2001


On Thu, Aug 02, 2001 at 10:17:03PM +0200, Thomas Schatzl wrote:

> > - The variables "ScreenHeight" and "ScreenWidth" are calculated, but not
> > exported. That's a pity for they'd be very usefull - In the Linux version
> > they are exported. (I always recreate them from WindMax at startup)
> 
> WindMax contains garbage on NT consoles because the height of the console
> window is > 255 lines by default.

Oh, I didn't know.

> Since Borland only reserved a byte for
> width and height inside this variable your app will have serious problems
> with that.

And how does the "window" command handle this?

> Apart from that problem: what do you do when the window dimensions change
> because the user resized the console window ? (both NT + Linux/X)

Actualy nothing.
I just have an unusual resolution in the textmode - so I need it.

What someone could do under Linux is to create a procedure for to call
when signal 28 (SIGWINCH) occurs, then recalculate the screensize and
redraw the screen.

I don't know that much about Windows.

> But imo this way to access the screen does not cause the main performance
> hit (if there's any for the usual purposes) - rather the difference between
> graphics output and text mode output.

Oh, I have a slow machine and it is definitly slow under Windows. Not
only in a window, but also in fullscreen-mode!

> > - There are many procedures wich are simply empty. What about putting
> > something like this into them:
> >   "If DEBUG then RunError(DebugError);" ???
> 
> Because these procedures are obsolete ? Some stuff isn't supported or can't
> be implemented the same way it was done in DOS times in Win32 at all....

Yes, I know the reason, but...
I meant it as help for people, who want to port programs from TurboPascal to 
FreePascal. When something is not working, then this could help to
figure out why.

-- 
Tschuess
	Andreas




More information about the fpc-pascal mailing list