+ ISO mode: accept put/get without parameter, works on Input/Output respectively, resolves #37949

git-svn-id: trunk@47147 -
This commit is contained in:
florian 2020-10-20 21:03:51 +00:00
parent 91a6223281
commit 4afa4a73c6
3 changed files with 27 additions and 0 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -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
View File

@ -0,0 +1,6 @@
{$MODE ISO}
program p(input, output);
begin
get;
put
end.