Recent

Author Topic: >> HELP <<SOLVED by "engkin" "Astronomy on the PC" O.Montenbruck 2ed 1994  (Read 14888 times)

juanirias

  • Full Member
  • ***
  • Posts: 100
Hello! I need some help for running the NUMINT.PAS ( which need a mod on DELIB.PAS ).

link: http://extras.springer.com/1994/978-3-662-05861-9
« Last Edit: July 16, 2014, 05:46:33 pm by juanirias »

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Are you allowed to distribute the sources (they seem to go with to a book)?
The doc says you are allowed to alter the program to your needs, but it does not mention you are allowed to distribute.

Bart

engkin

  • Hero Member
  • *****
  • Posts: 3112
The code posted above belongs to the 2nd edition (1994). With a random search I reached the 3rd edition's code on the publisher's website:
http://extras.springer.com/1998/978-3-662-03351-7/

juanirias

  • Full Member
  • ***
  • Posts: 100
Thanks "engkin" for found this... so is PUBLIC !!  You are a "hero member"

engkin

  • Hero Member
  • *****
  • Posts: 3112
Thanks "engkin" for found this... so is PUBLIC !!  You are a "hero member"
Actually my post was a solution to your problem, but that does not mean you have the right to distribute the code. I hope you understand that. I suggest that you delete the code from your post.

juanirias

  • Full Member
  • ***
  • Posts: 100
Thanks! Actually I’m trying to compile, but have trouble with WinCrt; can you help me?

engkin

  • Hero Member
  • *****
  • Posts: 3112
Please delete the code in your first post first.

juanirias

  • Full Member
  • ***
  • Posts: 100

engkin

  • Hero Member
  • *****
  • Posts: 3112
Thank you.

To be able to compile NUMINT.PAS, I took the following steps:
1 - Chose Turbo Pascal mode by adding {$MODE tp} after program:
2 - Defined DOS.
3 - Introduced type Integer as LongInt

Code: [Select]
...
PROGRAM NUMINT ( INPUT,OUTPUT, NUMINP );
{$MODE tp}  //<---- 1
{$define DOS} // <---- 2
...
  type integer=LongInt; // <---- 3

  CONST J2000  = 0.0;

4 - Replaced included files path from absolute to relative:
Code: [Select]
  (*$I \SomeDir\SomeFile.PAS *)
to
Code: [Select]
  (*$I .\SomeDir\SomeFile.PAS *)  //<---- 4 (notice the dot)
for this one I used Search in Files window to replace "$I \" with "$I .\" and applied it in the directory where I have NUMINT.PAS
« Last Edit: July 10, 2014, 04:59:07 am by engkin »

juanirias

  • Full Member
  • ***
  • Posts: 100
I’m under openSUSE 13.1;  I make the additions, but still the error.
Can you try to mod using the advice (my knowledge is limited). In DELIB.PAS say:

(*  Turbo Pascal adaption:                                               *)
(*                                                                       *)
(*  Turbo Pascal uses special data types to pass a function or procedure *)
(*  as formal argument of another function or procedure. For this        *)
(*  purpose the following procedure type is declared and used in the     *)
(*  specification of STEP and DE:                                        *)
(*                                                                       *)
(*      DE_FUNC = PROCEDURE ( X: REAL; VAR Y,YP: DE_EQN_VECTOR );        *)
(*                                                                       *)
(*-----------------------------------------------------------------------*)

and in the DE.PAS says

ROCEDURE DE ( F                  :  DE_FUNC;            (* Turbo Pascal *)

I don’t know how to adapt...

Thanks for help me !!!

Regards, JUAN

engkin

  • Hero Member
  • *****
  • Posts: 3112
I’m under openSUSE 13.1;  I make the additions, but still the error.
I don't use Linux. What error did you get?

juanirias

  • Full Member
  • ***
  • Posts: 100
Error: Identifier not found "STEP"

engkin

  • Hero Member
  • *****
  • Posts: 3112
Error: Identifier not found "STEP"
Obviously you did not do step 4:
4 - Replaced included files path from absolute to relative:
Code: [Select]
  (*$I \SomeDir\SomeFile.PAS *)
to
Code: [Select]
  (*$I .\SomeDir\SomeFile.PAS *)  //<---- 4 (notice the dot)
for this one I used Search in Files window to replace "$I \" with "$I .\" and applied it in the directory where I have NUMINT.PAS

Unit DELIB, for instance, has:
Code: [Select]
...
IMPLEMENTATION

  (*$I \DE\EPSMACH.PAS *)
  (*$I \DE\INTRP.PAS   *)
  (*$I \DE\STEP.PAS    *)
  (*$I \DE\DE.PAS      *)

END.

and must be changed to:
Code: [Select]
IMPLEMENTATION

  (*$I .\DE\EPSMACH.PAS *)
  (*$I .\DE\INTRP.PAS   *)
  (*$I .\DE\STEP.PAS    *)
  (*$I .\DE\DE.PAS      *)

END.

juanirias

  • Full Member
  • ***
  • Posts: 100
error on DE.PAS:
"          STEP ( X,YY,F,NEQN,H,EPS,WT,START,          "

juanirias

  • Full Member
  • ***
  • Posts: 100
picture of DE.PAS

 

TinyPortal © 2005-2018