ReadLn doesnt't work #3

Open
opened 2017-02-28 15:59:33 +00:00 by avbelyaev · 0 comments
avbelyaev commented 2017-02-28 15:59:33 +00:00 (Migrated from github.com)
program testRead;

type Signature = array[1..5] of integer;

var m:Signature;

begin
  ReadLn(m[1]);
  ReadLn(m[2]);
  ReadLn(m[3]);
  Write('->',m[1],' ',m[2],' ',m[3]);
end.

btpc.exe <testRead.pas >test.exe && test.exe
12
34
56
->12 0 0

ReadLn doesn't work if called a couple of times.
If change ReadLn -> Read, then it works as intented

program testRead; type Signature = array[1..5] of integer; var m:Signature; begin ReadLn(m[1]); ReadLn(m[2]); ReadLn(m[3]); Write('->',m[1],' ',m[2],' ',m[3]); end. btpc.exe <testRead.pas >test.exe && test.exe 12 34 56 ->12 0 0 ReadLn doesn't work if called a couple of times. If change ReadLn -> Read, then it works as intented
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BeRo1985/berotinypascal#3
No description provided.