I am making a console program which I would also like to translate into a HP Pascal program, which to the best of my knowledge does not support TStringList
Does it support ReadStr() (which is ISO Extended Pascal, according to the
fpc docs)?
The default conversion routines number<->string are Val() and Str().
If you use these, you don't need a try..except block.
What I hope to achieve is being able to select a number which corresponds to the line position in the text file, while making sure that any invalid lines are skipped.
What exactly do you mean by that?
Should it show the number on the X-th line in the text file?
Should it show the X-th valid entry in the text file?
Do invalid lines matter when yoy say "corrsponds to the line position in the text file"?
There's to much ambiguity.
Bart