Adriaan van Os wrote:
vanam srihari kumar wrote:
Dear All
I am porting the code developed using pc and cc compilers on solaris 2.6 to solaris 2.8 with gcc and gpc compilers.
I am using the makefile from the older version.In that makefile, linker(ld) is called explicitly.
Right now I am facing the below problems
- related to real array constant intialization.
TYPE MaxCPlus_RArray = ARRAY[1..MaxCplus] OF REAL; Maxcomp_Array = ARRAY[1..Maxcomp] OF REAL;
CONST wPAF : Maxcomp_Array = [ 0.040, 0.225, 0.100, 0.344, 0.008, 0.098, 0.152, 0.176, 0.193, 0.227, 0.251, 0.197, 0.296, 0.351, 0.394, 0.444, 0.490, 0, 0, 0, 0, 0, 0, 0, 0 ];
it is giving following error
/home/kvsspl/esipas81/flo/joint_lib.inc:125: incompatible types in initialization /home/kvsspl/esipas81/flo/joint_lib.inc:125: initial value is of wrong type /home/kvsspl/esipas81/flo/joint_lib.inc:125: set constructor elements must be of ordinal type /home/kvsspl/esipas81/flo/joint_lib.inc:125: set constructor elements must be of ordinal type /home/kvsspl/esipas81/flo/joint_lib.inc:125: set constructor elements must be of ordinal type /home/kvsspl/esipas81/flo/joint_lib.inc:125: set constructor elements must be of ordinal type
Replace [ ] with ( ).
Yes. Seems like Sun Pascal has yet another intialization syntax (besides standard [1: 0.040; ...] and BP (0.040, ...)).
The problem with this syntax is that it really looks like set constants ([1, 2, 3]), especially if the array fields are ordinal types. So changing it should also make the code somewhat more readable IMHO.
- Do we have the standard library function in gpc
which accomplishes the below functionality of sun library function. open(file, pathname, history, error, buffer)
open associates the permanent file file with a file variable for reading or writing. open does not actually open the file;
Maybe "Assign" is useful.
Yes. I don't know what the latter 3 parameters do. If they're important, please explain.
- compiler error: label `9999' used before containing
binding contour
what could be the cause for above error
Could this be a bug that has been solved by now http://www.gnu-pascal.de/gpc/Fixed-Bugs.html, item
20050307: problem with string operations and goto (contour0.pas, contourbug.pas, martin1.pas, berend3.pas).
Yes, looks like it. If so, upgrading GPC is probably your best option. If you're afraid of that (because the current releases are labelled alpha), you could try showing us the relevant code (with some context), and we *might* be able to suggest work-arounds ...
Frank