A few weeks ago, at the time of the most recent PLplot release, I posted a 
short announcement on comp.lang.ada, and I gave a very simple example of usage 
in an Ada program. Someone asked why plinit couldn't be done in the (Ada) 
elaboration of PLplot and why couldn't plend be done in the (Ada) finalization 
when the program terminates. These are Ada concepts meaning roughly that plinit 
could be worked into Ada's own initialization (aka elaboration, sort of) and 
finalization and thus executed automatically. I replied that in some usage 
situations PLplot needs to do some work before plinit is called. So that left 
the question of whether it made sense to put plend into an Ada finalization 
stage. I remarked that the manual method currently used would be better if the 
user wanted to free resources before the program was done running, but that it 
might be a good idea to have the automatic method (in the Ada finalization 
stage) in case the user forgot to do it manually. Then someone pointed o
 ut that if the program raises an exception, the manual method would be 
bypassed. We could ask the user to write an exception handler but s/he might 
forget to do that too.

One might consider removing the manual method (and keeping backward 
compatibility by making the Ada-level call do nothing) but I don't like 
removing the manual option for reasons stated above.

So before trying to put in an automatic call to plend at the Ada finalization, 
I need to know:

(1) Does it hurt to call plend twice without an intervening plinit? I.e., the 
user puts in a manual plend and Ada does another automatic plend.

(2) If so, is there a way to find out if PLplot is "active," that is, has there 
been a call to plinit but no matching call to plend?

Jerry
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to