[fpc-pascal] special numbers detected by val()

Marc Santhoff M.Santhoff at t-online.de
Sat Aug 25 22:43:58 CEST 2007


Hi,

is there any special handling of NaN's or +/-INF's built into the
VAL-procedure?

If so, where is it? ;)

You ask why? Okay:

I want to read in text files containing matrix data. The data is
organized in rectangular manner, but some places are not valid because
they are from physical measurements at places that are not reachable by
any instrument.

In this data files I have to use a convention to detect this invalid
spots.

My idea was to uses the string "NaN" or the like because anything else
would narrow the range of input values (e.g. using -999 or similar for
expressing the special case). If val could handle this itself, I'd not
have to write any parsing code.

TIA,
Marc





More information about the fpc-pascal mailing list