home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
fortran
/
library
/
comline
/
p_cline.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-07-01
|
2KB
|
54 lines
{ =======================================================================
PROGRAM FILE: P_CLINE.PAS
DATE: July 1, 1991
VERSION: 1.01 REVISION DATE:
AUTHOR: Scott D. Heavner
LANGUAGE: Turbo Pascal 5.0
COPYRIGHT: 1991, Scott D. Heavner
======================================================================
DESCRIPTION: P_CLINE is an example of how to use the COMLINE.ASM
subroutine. The user should determine what flags and
such he wishes to check for, and incorporate his own
code. This can be placed as part of a subroutine or
in the main program.
==================================================================== }
program Pascal_Test;
{$L COMLINE}
{$F+} {Force far calls for FORTRAN procedure}
type {Define character*128 array type}
Str = array [1..128] of char;
var
Inp : Str;
i, len: integer;
{Define EXTERNAL fortran procedure}
procedure CLINE(cin: Str); external;
begin
CLINE(Inp); {Call FORTRAN}
len := ORD(Inp[1]); {Get length of input (in first character)}
writeln ('Length = ',len);
len := len + 1; {Increase length to define new input}
for i := 2 to 128 do {Display string and add LF with CR}
begin
write(Inp[i]);
if (Inp[i]=chr(13)) then writeln;
if (i=len) then {If past new input, tell user}
begin
writeln;
writeln('Begin Previous data . . .');
end
end
end.