MartyIX
MartyIX

Reputation: 28648

How to read input word by word in FreePascal?

I would like to read from standard input word by word (i.e., the input string is always a collection of words separated with blanks). Now I'm using the read function and I read the input char by char.

Is it possible? Thanks!

Upvotes: 0

Views: 1016

Answers (1)

Birger
Birger

Reputation: 4353

With readln (readline) you can read a whole line that you can split into separate words. There is no function to read words from a file.

Upvotes: 2

Related Questions