Klaus Friis Ãstergaard wrote:
a.. Is it possible to make the program development on the linux, and when I am finished to cross-compile it to windows 98/windowsNT?
Yes.
b.. How do I work with graphics in GNU pascal, so that I am able to use the same source to compile to both linux/windows execute files.
You can try the GRX library:
It works with DOS/VGA (including VESA), Linux/SVGAlib, Linux/X11, other Unices/X11, and I have a development version that works with mingw32/WinAPI. All of this can be cross-compiled from Linux.
c.. Where do I find information on the graphics tools to use in GPC.
Only in the source, sorry.
d.. I am working with the traveling salesmans problem. There I need to make a 2-dimensional array which contain the distance between each city/node. As I'am new to GNU pascal and pointers, I wounder if it is possible to make some kind of pointer structure that is working faster, use memory dynamically or smarter than using a 2-dimensionally array?
Not knowing too much about the traveling salesman problem I think that the 2-dimensional array is the fastest solution.
If you want to keep the dimensions of the array adjustable at run-time, you can use Extended Pascal's schema types with GPC:
Type MyArray ( m, n ) = array [ 1..m, 1..n ] of Integer;
Var A: MyArray ( 42, 137 ); B: ^MyArray;
[...] New ( B, 42, 137 ); [...] A [ 10, 17 ]:= B^ [ 22, 107 ]; [...] Dispose ( B ); New ( B, 1000, 2000 ); [...]
Another hint: Not everybody has a screen of 353 characters width. Your email would be easier to read if you used at most 80 characters per line. (IMHO, 64 are even finer.:-)
Hope this helps,
Peter