comp.lang.ada
 help / color / mirror / Atom feed
* Question about Spark_IO
@ 2012-04-08 22:07 Peter C. Chapin
  2012-04-10 16:52 ` Phil Thornley
  2012-04-11 14:35 ` Yannick Duchêne (Hibou57)
  0 siblings, 2 replies; 3+ messages in thread
From: Peter C. Chapin @ 2012-04-08 22:07 UTC (permalink / raw)


I'm doing something like this to close a file using Spark_IO

    Spark_IO.Close(Input, Input_Status);
    if Input_Status /= Spark_IO.Ok then ...

The Examiner says there is a flow error with the first line because the 
assignment to Input is "ineffective." This is because it is an 'in out' 
parameter and nothing is being done with the returned value.

My understanding is that Close puts the file handle it has been given 
into an invalid state so that any further use of it will result in an 
error. Thus it is not correct to do anything with that value after Close 
returns.

Is this a case where it is appropriate to suppress the flow error with 
an '--# accept flow_message...' annotation or is there some better way 
to handle this situation?

Thanks!

Peter



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-11 14:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-08 22:07 Question about Spark_IO Peter C. Chapin
2012-04-10 16:52 ` Phil Thornley
2012-04-11 14:35 ` Yannick Duchêne (Hibou57)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox