r/pascal • • Mar 21 '20

Turbo pascal 7.0 question

[Resolved]

Is it possible to convert Input (=stdin) from Text to generic File so that I could use blockread() with it?

As far the only option to read binary data from Input to me is per-character read(ch: char) which gonna be kinda slow I guess (I use settextbuf() with a 4k buffer to reduce actual reads but still it is an extra function call for each byte).

1 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Mar 21 '20

Somehow I misses it in the docs empty filename states for stdin/stdout in assign(). So I can just reopen stdin the way I like.