Recent

Author Topic: Another OLD code  (Read 2407 times)

juanirias

  • Full Member
  • ***
  • Posts: 100
Another OLD code
« 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

Regards, JUAN

« Last Edit: July 29, 2021, 08:22:35 pm by juanirias »

alpine

  • Hero Member
  • *****
  • Posts: 1032
Re: Another OLD code
« Reply #1 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.
"I'm sorry Dave, I'm afraid I can't do that."
—HAL 9000

wp

  • Hero Member
  • *****
  • Posts: 11833
Re: Another OLD code
« Reply #2 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:
Code: Pascal  [Select][+][-]
  1. PROCEDURE ijk2llA            ( R                                     : Vector;
  2.                                JD                                    : EXTENDED;
  3.                                VAR 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:
Code: Pascal  [Select][+][-]
  1. PROCEDURE ijk2llA       ( Recef                                    : Vector;
  2.                              VAR Latgc,Latgd,Lon,Hellp             : EXTENDED );

Both declarations must have the same parameters. The compiler complains because the procedure with the exact arguments of the interface declaration is not found.

juanirias

  • Full Member
  • ***
  • Posts: 100
Re: Another OLD code
« Reply #3 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 ?
« Last Edit: July 29, 2021, 08:53:35 pm by juanirias »

wp

  • Hero Member
  • *****
  • Posts: 11833
Re: Another OLD code
« Reply #4 on: July 29, 2021, 08:53:30 pm »
Did you also rename R to Recef?

Can try to compile please ?
Which one is the program file? And there is a missing unit "NewDelay".
« Last Edit: July 29, 2021, 08:55:10 pm by wp »

juanirias

  • Full Member
  • ***
  • Posts: 100
Re: Another OLD code
« Reply #5 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

wp

  • Hero Member
  • *****
  • Posts: 11833
Re: Another OLD code
« Reply #6 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...
« Last Edit: July 29, 2021, 09:22:06 pm by wp »

 

TinyPortal © 2005-2018