home *** CD-ROM | disk | FTP | other *** search
- Program CLinkDemo1;
- { This sample program is a simple example of how to create a }
- { routine in Turbo C that can be linked into a Turbo Pascal }
- { program. }
- {$A-,F-}
-
- Uses Crt;
-
- Var
- OldString, { Original String before conversion }
- NewString : String; { Copy of string. This will be the }
- { string passed to the C routine. }
-
- {$L List4-1} { Link in the C OBJ file. }
-
- {$F+} { Enforce the Far Call requirement }
- Procedure UpString( Var S : String ); External;
- { Heading of the external procedure contained in the Turbo C }
- { .OBJ file. }
- {$F-}
-
- Begin { Main program }
- ClrScr; { Clear the output string }
- GotoXY( 1,5 ); { Reposition the Cursor }
- Write( 'Enter a lowercase string: ' );
- Readln( OldString ); { Prompt user and get the input }
- NewString := OldString; { Save copy of string for output }
- UpString( NewString ); { Convert string to UpperCase }
- Writeln( 'Lowercase = ', OldString );
- Writeln( 'Uppercase = ', NewString );
- { Show the results to the user }
- Write( 'Press any key to quit' );
- While( Not Keypressed ) Do
- { NOP }; { Pause for a keypress }
- End.