I use gpc to make practics, in a asignature in the university of =coruña, and the program must run in a solaris machine, with gpc 2.0.
I have in my house linux, rh 5.2 with gpc 2.0, and last year in the =university i use sun pascal, to make the practicas and i have a module =to manipulate screen, but now don't work in gpc:
procedure CursorXY( x:integer; y:integer); begin write( chr(27), '[', y:0, ';', x:0, 'f'); end;
this procedure to put cursor in coordinates xy, dont work on gpc. i need somthing that make this.
this other to clear te screen work perfectly:
procedure ClearScreen; begin write( chr(27), '[2J'); end;
can anybody help me!!!
the other problem, is that i use xxgdb to debug pascal programs but when =i wnat to inspect the vaule of a var, i need to write display <var> with =te first letter capitalized, but if i click in the var don't work, no =solution i found to this problem,
Hi, Marcos!
(Hint: If you insert line breaks into your email it becomes more readable.;-)
gpc-2.0 is rather old. Your university should upgrade to gpc-19990118, available from:
ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/beta/ .
gpc-19990118 comes with a portable, BP-compatible CRT unit, based on ncurses, that makes screen manipulation easy.
However ...
IIRC, gpc-2.0 had a bug to suppress output when writing integers with a field width of zero.
To work around, use:
procedure CursorXY( x:integer; y:integer); begin write( chr(27), '[', y:1, ';', x:1, 'f'); end;
To get rid of the problem, upgrade to gpc-19990118 and use CRT. (Your own CursorXY will work with gpc-19990118 without the workaround, but it will not be portable.)
Yes, that's a known problem with GPC and GDB: While Pascal is not case-sensitive, GDB (and therefore xxgdb) is and expects Pascal identifiers Written With The First Letter Capitalized. "Clicking" on the var will probably use the notation as written in your source.
Hope this helps,
Peter