[fpc-pascal] Array assignment, and not-a-number
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Mon Apr 15 16:48:07 CEST 2013
I was having a bit of fun earlier while waiting for a call. Am I correct
in believing that something like
type t1= array of integer;
var a1: t1;
x: integer;
a1 := [1,2,3,4,5];
can't be done at present, irrespective of any custom definition of the
:= operator?
Is there an accessible not-a-number constant, to allow me to do
something like
var reduce: double= NAN;
x := reduce + a1;
with an appropriate definition of the + operator without risk that an
error would try to evaluate it as an ordinary arithmetic expression?
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-pascal
mailing list