home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
pli
/
runpli1a.arc
/
FILE
< prev
next >
Wrap
Text File
|
1987-09-29
|
1KB
|
64 lines
file=OPEN('FILE.DAT','w');
i=1;
DO WHILE(i <= 5);
PRINT(file,SQRT(i),' ');
i=i+1;
END;
DO WHILE(i <= 10);
PRINT(file,SQRT(i)); PUTCRLF(file);
i=i+1;
END;
CLOSE(file);
i=1;
file=OPEN('FILE.DAT','r');
DO WHILE(! ENDFILE(file));
real=GETREAL(file);
IF (! ENDFILE(file)) THEN
PRINT(SYSPRINT,i,CHAR(9),real);
PUTCRLF;
i=i+1;
END;
CLOSE(file);
file=OPEN('FILE.DAT','w');
i=1;
DO WHILE(i <= 5);
PRINT(file,i,' ');
i=i+1;
END;
DO WHILE(i <= 10);
PRINT(file,i); PUTCRLF(file);
i=i+1;
END;
CLOSE(file);
i=1;
file=OPEN('FILE.DAT','r');
DO WHILE(! ENDFILE(file));
integer=GETINT(file);
IF (! ENDFILE(file)) THEN
PRINT(SYSPRINT,integer);
PUTCRLF;
i=i+1;
END;
CLOSE(file);
file=OPEN('FILE.DAT','w');
PRINT(file,'line 1'); PUTCRLF(file);
PRINT(file,'line 2'); PUTCRLF(file);
CLOSE(file);
file=OPEN('FILE.DAT','r');
DO WHILE(! ENDFILE(file));
string=GETSTRING(file);
IF (! ENDFILE(file)) THEN
PRINT(SYSPRINT,'"',string,'"');
PUTCRLF;
END;
CLOSE(file);
file=OPEN('FILE.DAT','rb');
l=1;
DO WHILE(l > 0);
a=GETCHAR(file);
l=LENGTH(a);
IF l > 0 THEN
PRINT(SYSPRINT,a);
END;
CLOSE(file);