mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-03 16:18:32 +02:00
+ ISO mode: accept put/get without parameter, works on Input/Output respectively, resolves #37949
git-svn-id: trunk@47147 -
This commit is contained in:
parent
91a6223281
commit
4afa4a73c6
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -18495,6 +18495,7 @@ tests/webtbs/tw37823.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw37844.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw37878.pp svneol=native#text/plain
|
||||
tests/webtbs/tw37926.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw37949.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3796.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3805.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3814.pp svneol=native#text/plain
|
||||
|
@ -44,6 +44,8 @@ unit iso7185;
|
||||
|
||||
Procedure Get(Var t: Text);
|
||||
Procedure Put(Var t: Text);
|
||||
procedure Get;
|
||||
Procedure Put;
|
||||
|
||||
Procedure Get(Var f: TypedFile);
|
||||
Procedure Put(Var f: TypedFile);
|
||||
@ -204,6 +206,24 @@ unit iso7185;
|
||||
end;
|
||||
|
||||
|
||||
procedure Get;[IOCheck];
|
||||
var
|
||||
c : char;
|
||||
Begin
|
||||
Read(input,c);
|
||||
End;
|
||||
|
||||
|
||||
Procedure Put;[IOCheck];
|
||||
type
|
||||
FileFunc = Procedure(var t : TextRec);
|
||||
begin
|
||||
inc(TextRec(Output).BufPos);
|
||||
If TextRec(Output).BufPos>=TextRec(Output).BufSize Then
|
||||
FileFunc(TextRec(Output).InOutFunc)(TextRec(Output));
|
||||
end;
|
||||
|
||||
|
||||
procedure Get(var f:TypedFile);[IOCheck];
|
||||
Begin
|
||||
if not(system.eof(f)) then
|
||||
|
6
tests/webtbs/tw37949.pp
Normal file
6
tests/webtbs/tw37949.pp
Normal file
@ -0,0 +1,6 @@
|
||||
{$MODE ISO}
|
||||
program p(input, output);
|
||||
begin
|
||||
get;
|
||||
put
|
||||
end.
|
Loading…
Reference in New Issue
Block a user