[fpc-pascal]Reading the screen
bigmatt19 at aol.com
Thu Sep 28 20:45:04 CEST 2000
I looked around the docs and couldn't find anything that would help you,
however, I think I still may have a solution for you.
If you want to write something to the console you can write a wrapper
for the writeln procedure that would do the following:
1. behave like the current write/writeln procedures do
2. in addition, keep track of all screen writes in an array
eg. var Screen[1..80,1..25] of char;
Now, that could get kind of tricky when you start throwing in windows
and such. But, for straight screen writing and no fancy stuff, that
should do the trick. Also, it wouldn't be all that hard to write it so
that the array would totally mimic the screen.
A second option, is pick up an assembler book and call the interupt that
will return that info for you. (A word of caution on that though.
Interupts are slow, so if speed is important, that would not be the way
to go. Also, the use of assembler makes your program very non-portable.
However, if neither of those are a concern for you it would probably be
Perhaps one of the more experienced people with FPC will have better
insight into a way to do this that is already built into the language.
James_Wilson at i2.com wrote:
> Does anyone know how to read characters from a text-mode win32/go32
> program? I need to gotoxy and read some information, but I can't figure out
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal