On 08/09/2022 11:24 AM, Synopsis wrote:
On Wednesday, 7 September 2022 at 23:06:44 UTC, rikki cattermole wrote:
Text in buffer: "123\n"
Text in buffer: "\n"
Read: exception, expecting number for "\n"
Changing your readf format specifier to include the new line should work.
Adding the \n seems to solve my problem: ```readf("%s\n", &f1.num)```
I have two further questions about this!
a- What is the difference with this syntax with the exclamation mark?
That is a template.
It'll type check that the format specifier matches your arguments.
b- Do I need to put ```/n``` in every readf statement? I mean,
considering that every input gets entered after pressing intro key (and
I guess this is what introduce the \n)