home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TP_ADV.ZIP / LIST0413.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-07-31  |  985 b   |  37 lines

  1. Program LinkCRTL;
  2. { This program is a simple driving program that shows how to    }
  3. { link a C module that contains a call to a C RTL function into }
  4. { a Turbo Pascal program.  Note that the Pascal program must be }
  5. { the one that links the C RTL function into the final          }
  6. { executable file.                                              }
  7.  
  8. {$N+,E+}
  9.  
  10. Uses Crt;
  11.  
  12. Var
  13.   X,Y : Double;
  14.   Result : Double;
  15.  
  16. {$L pow}
  17.  
  18. Function pow( x, y : double ) : double; External;
  19. { Header for the Turbo C RTL routine that will be linked into   }
  20. { sample program.                                               }
  21.  
  22. {$L list4-12}
  23.  
  24. procedure power( x,y : double ); External;
  25. { External C routine contained in the module TESTPOW.OBJ.  This }
  26. { function will make a call to the Pascal routine that links    }
  27. { the necessary C RTL function.                                 }
  28.  
  29. Begin
  30.   Result := 0;
  31.   X := 2.0;
  32.   Y := 6.0;
  33.   power( x,y );
  34.   Writeln( Result );
  35. End.
  36.  
  37.