Programming => General => Topic started by: juanirias on July 29, 2021, 08:16:24 pm
Title: Another OLD code
Post by: juanirias on July 29, 2021, 08:16:24 pm
Dear all
I have 3 of this kind error in "ast2body.pas"
Error: Forward declaration not solved "ijk2llA(Vector;Extended;var Extended;var Extended;var Extended;var Extended);"
I attached the source code ( Its public too ) https://celestrak.com/software/vallado/pascal.zip (https://celestrak.com/software/vallado/pascal.zip)
Regards, JUAN
Title: Re: Another OLD code
Post by: alpine on July 29, 2021, 08:28:23 pm
Interface declarations of ijk2llA, ijk2llE, ijk2llB have one more parameter (JD:EXTENDED) than implementations. Because declarations and implementations doesn't match, you have errors.
Title: Re: Another OLD code
Post by: wp on July 29, 2021, 08:28:34 pm
In the interface part of the unit you declare procedure ijk2llA with parameters R:Vector, JD:extended andVAR Latgc,Latgd,Lon,Hellp: Extended:
But in the interface part, the arguments suddenly are Recef: Vector and VAR Latgc,Latgd,Lon,Hellp: Extended, i.e. R is renamed to Rcef and JD is missing:
Both declarations must have the same parameters. The compiler complains because the procedure with the exact arguments of the interface declaration is not found.
Title: Re: Another OLD code
Post by: juanirias on July 29, 2021, 08:50:04 pm
Thanks
I try to remove The JD, but still can't compile...
Can try to compile please ?
Title: Re: Another OLD code
Post by: wp on July 29, 2021, 08:53:30 pm
Which one is the program file? And there is a missing unit "NewDelay".
Title: Re: Another OLD code
Post by: juanirias on July 29, 2021, 08:54:42 pm
to be honest, no! I'll do it and I'll let you know, thanks for the hint
Title: Re: Another OLD code
Post by: wp on July 29, 2021, 09:00:13 pm
TestPas compiles when I remove the missing unit from the "uses" list, and when I comment the unknown procedure PatchCrt at the beginning of the main program - no idea whether these removals have an effect...
TestASTF has a LOT of issues - a variable named "Try" - this is a reserved word. Rename it to iTry ("i" for "integer"), or similar. - a comment line beginning with ! - a comment line "{ Time s" missing the ending } - Unknown function UpCaseS: You could use Uppercase(S) from the FPC unit SysUtils instead, but this could introduce new issues with your date functions, e.g. DayOfWeek. - Incomplete ReadLn instructions in procedure TestInitTime - Procedure TestGetIntMon: Variable GetIntMon has the same name as the tested function GetIntMon - remove the variable, it is not called here anyway - The same with TestDayOfWeek where an unused variable has the same name as the funtion DayOfWeek. - Procedure TestDaylightSt: there is a semicolon inside the DayLightSt function parameter list. ...plus many more - I'm giving up here...