It is required to read the record from the file (given the name, surname, zodiac sign, date of birth). Next, write the data to the array. Gives an error message

106: Invalid numeric format.


type znak= record name: string[18]; zodiac: string[11]; bday: array[1..3] of integer; end; var book: array[1..8] of znak; fbook: file of znak; fi, fo: text; k,i,j: integer; const zod_s: array[1..12] of string = ('capricorn','aquarius','pisces','aries','taurus','gemini','cancer','leo','virgo','libra','scorpio','sagittarius'); begin assign(fi,'z4.dat'); reset(fi); assign(fo,'z4.res'); rewrite(fo); for k:=1 to 8 do with book[k] do read(fi,name,zodiac,bday[1],bday[2],bday[3]); end. 

How to fix?

  • Sample file please give. - Dex

1 answer 1

Such an error often happens when they want to write a string or the like into an integer variable.
Give an example of the file, as has been said before.