On 9/7/22 16:24, Synopsis wrote:

> a- What is the difference with this syntax with the exclamation mark?
> ```readf!"%s\n"(f1.num);```

That's the templated version, which is safer because it checks at compile time (important distinction) that the arguments and the format specifiers do match.

> b- Do I need to put ```/n``` in every readf statement?

Another option is to use a space character, which reads and skips any number of any whitespace character. I have written something about that here:


And this one talks about readln, which may be more suitable in some cases:


And there is formattedRead:


> Forgive me if I'm asking silly questions.

There is never a silly question. If a question came up, it is as legitimate as it gets.

And welcome to programming! :)


Reply via email to