home *** CD-ROM | disk | FTP | other *** search
- Program LinkCRTL;
- { This program is a simple driving program that shows how to }
- { link a C module that contains a call to a C RTL function into }
- { a Turbo Pascal program. Note that the Pascal program must be }
- { the one that links the C RTL function into the final }
- { executable file. }
-
- {$N+,E+}
-
- Uses Crt;
-
- Var
- X,Y : Double;
- Result : Double;
-
- {$L pow}
-
- Function pow( x, y : double ) : double; External;
- { Header for the Turbo C RTL routine that will be linked into }
- { sample program. }
-
- {$L list4-12}
-
- procedure power( x,y : double ); External;
- { External C routine contained in the module TESTPOW.OBJ. This }
- { function will make a call to the Pascal routine that links }
- { the necessary C RTL function. }
-
- Begin
- Result := 0;
- X := 2.0;
- Y := 6.0;
- power( x,y );
- Writeln( Result );
- End.
-