Jerry,

While adapting example 12 to use plcol1 and plscmap1l I came across one
interesting issue with ada. 

Several example use something like

    A_Boolean : Boolean_Array_1D(1 .. 1);

    A_Boolean(1) := False;

    plscmap1l(HLS, i, h, l, s, A_Boolean);

Note that in these cases the h, l, s arrays are only of length 2. This
works for these examples, but when I try for example 12 with colour
arrays of length 5 then it doesn't work. I assume this is trying to
emulate the C usage of NULL for the array pointer to signal no colours
are reversed. Explicitly defining an array of length 5 and willing with
False values works as expected.

With f77 I found some errors in the examples where a value of 0 was
passed for this purpose. Because f77 passes all arguments by reference
this actually got interpreted as an array of length 5 with the first
value 0. Obviously the subsequent values were undefined. I wonder if
something similar is happening in Ada? Perhaps you could explain? Use of
valgrind shows use of uninitialised values in the case which doesn't
work, but only when the array length is > 2. This suggests my diagnosis
might be correct. Can you think of a way of fixing this so a NULL value
equivalent works, or if not, then correct the examples? 

Thanks

Andrew



------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to