How do i read in pascal a string and an integer in the same line like the C's scanf("%s %d", str, &n); version?
0
votes
3 Answers
1
votes
0
votes
If from stdin:
read(s); read(i);
If not, then you are out of luck for Borland's Pascal variants. Free Pascal (2.4+) inherited a variant from Apple(Standard Pascal derivative) variants that takes input from a string:
readstr(inputstr,s,i);
IIRC this is an Extended Pascal standard procedure that is commonly implemented by standard Pascal variants too, since it is basically a variant of the standard Pascal readln from input.