comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter C. Chapin" <PChapin@vtc.vsc.edu>
Subject: Question about Spark_IO
Date: Sun, 08 Apr 2012 18:07:48 -0400
Date: 2012-04-08T18:07:48-04:00	[thread overview]
Message-ID: <Cf2dnRYegbnckR_S4p2dnAA@giganews.com> (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



             reply	other threads:[~2012-04-08 22:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-08 22:07 Peter C. Chapin [this message]
2012-04-10 16:52 ` Question about Spark_IO Phil Thornley
2012-04-11 14:35 ` Yannick Duchêne (Hibou57)
replies disabled

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