comp.lang.ada
 help / color / mirror / Atom feed
* use_error
@ 2001-04-03 22:59 arcele
  2001-04-04  0:11 ` use_error Fraser Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: arcele @ 2001-04-03 22:59 UTC (permalink / raw)


USE_ERROR when using the Direct_IO Package, can anyone tell me what in the
heck this means, or where I can read up on it??? thanks....ryan =]





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

* Re: use_error
  2001-04-04  0:11 ` use_error Fraser Wilson
@ 2001-04-03 23:17   ` arcele
  2001-04-04  3:12     ` use_error Fraser Wilson
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: arcele @ 2001-04-03 23:17 UTC (permalink / raw)


No, i'm not doing that, what i'm actually trying to do is set up a chain
with seperate overflow, my function that calls the error looks like this....

procedure addlink(inrec : in a_hote) is
  min_val : integer;
begin
  dir_io.open(notes, dir_io.inout_file, "notes.dat");
   min_val := inrec.next;
    while min_val /= 0 loop
      dir_io.read(notes, new_rec, dir_io.positive_count(min_val));
      min_val := new_rec.next;
    end loop;
  dir_io.write(notes, new_rec, dir_io.positive_count(min_val));
 end;


Fraser Wilson <blancolioni@blancolioni.org> wrote in message
news:fy71yr9sewb.fsf@blancolioni.org...
> "arcele" <unhuh@hotmail.com> writes:
>
> > USE_ERROR when using the Direct_IO Package, can anyone tell me what in
the
> > heck this means, or where I can read up on it??? thanks....ryan =]
>
> Without code it's hard to say, but I expect you're doing something like
>
>    use Direct_IO;
>
> which you can't because it's a generic, and has to be instantiated.
>
> Fraser.
>





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

* Re: use_error
  2001-04-03 22:59 use_error arcele
@ 2001-04-04  0:11 ` Fraser Wilson
  2001-04-03 23:17   ` use_error arcele
  2001-04-04  1:23 ` use_error tmoran
  2001-04-06 13:09 ` use_error Michel Gauthier
  2 siblings, 1 reply; 8+ messages in thread
From: Fraser Wilson @ 2001-04-04  0:11 UTC (permalink / raw)


"arcele" <unhuh@hotmail.com> writes:

> USE_ERROR when using the Direct_IO Package, can anyone tell me what in the
> heck this means, or where I can read up on it??? thanks....ryan =]

Without code it's hard to say, but I expect you're doing something like

   use Direct_IO;

which you can't because it's a generic, and has to be instantiated.

Fraser.




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

* Re: use_error
  2001-04-03 22:59 use_error arcele
  2001-04-04  0:11 ` use_error Fraser Wilson
@ 2001-04-04  1:23 ` tmoran
  2001-04-06 13:09 ` use_error Michel Gauthier
  2 siblings, 0 replies; 8+ messages in thread
From: tmoran @ 2001-04-04  1:23 UTC (permalink / raw)


>USE_ERROR when using the Direct_IO Package, can anyone tell me what in the
>heck this means, or where I can read up on it??? thanks....ryan =]
  LRM A.13 "Exceptions in Input-Output", paragraph 10, says
"The exception Use_Error is propagated if an operation is attempted
that is not possible for reasons that depend on characteristics of
the external file. ...".  Are you trying to read from a printer, or
write to a read-only file, or something like that?



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

* Re: use_error
  2001-04-03 23:17   ` use_error arcele
@ 2001-04-04  3:12     ` Fraser Wilson
  2001-04-04  4:20     ` use_error Mark D. McKinney
  2001-04-04  4:43     ` use_error Wilhelm Spickermann
  2 siblings, 0 replies; 8+ messages in thread
From: Fraser Wilson @ 2001-04-04  3:12 UTC (permalink / raw)


"arcele" <unhuh@hotmail.com> writes:

> No, i'm not doing that, what i'm actually trying to do is set up a chain
> with seperate overflow, my function that calls the error looks like this....

OK, I'm an idiot.  Is the file read only?  See section A.13 in the Ada
reference manual (e.g. http://www.adapower.com/rm95/arm95_261.html#SEC261)
for the full story.

Fraser.



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

* Re: use_error
  2001-04-03 23:17   ` use_error arcele
  2001-04-04  3:12     ` use_error Fraser Wilson
@ 2001-04-04  4:20     ` Mark D. McKinney
  2001-04-04  4:43     ` use_error Wilhelm Spickermann
  2 siblings, 0 replies; 8+ messages in thread
From: Mark D. McKinney @ 2001-04-04  4:20 UTC (permalink / raw)




arcele wrote:

> No, i'm not doing that, what i'm actually trying to do is set up a chain
> with seperate overflow, my function that calls the error looks like this....
> 
> procedure addlink(inrec : in a_hote) is
>   min_val : integer;
> begin
>   dir_io.open(notes, dir_io.inout_file, "notes.dat")

What does the LRM Say a use error is?? Is notes global ?? When do you 
close this file ?? Can addlink be called more than once ??
If you can aswer these qustions I think you can figure out at least on 
potential cause of your use_error.

> 
>    min_val := inrec.next;
>     while min_val /= 0 loop
>       dir_io.read(notes, new_rec, dir_io.positive_count(min_val));
>       min_val := new_rec.next;
>     end loop;
>   dir_io.write(notes, new_rec, dir_io.positive_count(min_val));
>  end;
> 
> 
> Fraser Wilson <blancolioni@blancolioni.org> wrote in message
> news:fy71yr9sewb.fsf@blancolioni.org...
> 
>> "arcele" <unhuh@hotmail.com> writes:
>> 
>>> USE_ERROR when using the Direct_IO Package, can anyone tell me what in
>> 
> the
> 
>>> heck this means, or where I can read up on it??? thanks....ryan =]
>> 
>> Without code it's hard to say, but I expect you're doing something like
>> 
>>    use Direct_IO;
>> 
>> which you can't because it's a generic, and has to be instantiated.
>> 
>> Fraser.
>> 




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

* Re: use_error
  2001-04-03 23:17   ` use_error arcele
  2001-04-04  3:12     ` use_error Fraser Wilson
  2001-04-04  4:20     ` use_error Mark D. McKinney
@ 2001-04-04  4:43     ` Wilhelm Spickermann
  2 siblings, 0 replies; 8+ messages in thread
From: Wilhelm Spickermann @ 2001-04-04  4:43 UTC (permalink / raw)
  To: comp.lang.ada

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 200 bytes --]


On 03-Apr-01 arcele wrote:
...
>     while min_val /= 0 loop
...
>     end loop;
>   dir_io.write(notes, new_rec, dir_io.positive_count(min_val));

You�re writing to position 0 here. 

Wilhelm





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

* Re: use_error
  2001-04-03 22:59 use_error arcele
  2001-04-04  0:11 ` use_error Fraser Wilson
  2001-04-04  1:23 ` use_error tmoran
@ 2001-04-06 13:09 ` Michel Gauthier
  2 siblings, 0 replies; 8+ messages in thread
From: Michel Gauthier @ 2001-04-06 13:09 UTC (permalink / raw)


In article <9ado2r$vo1$1@slb1.atl.mindspring.net>,
  "arcele" <unhuh@hotmail.com> wrote:

> USE_ERROR when using the Direct_IO Package, can anyone tell me what in the
> heck this means, or where I can read up on it??? thanks....ryan =]

From my experience, Use_Error is an effect of an OS rejection.

Basic examples :
 - access rights violation
 - multiple opening of the same file
 - the OS file does not have a relevant structure



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

end of thread, other threads:[~2001-04-06 13:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-03 22:59 use_error arcele
2001-04-04  0:11 ` use_error Fraser Wilson
2001-04-03 23:17   ` use_error arcele
2001-04-04  3:12     ` use_error Fraser Wilson
2001-04-04  4:20     ` use_error Mark D. McKinney
2001-04-04  4:43     ` use_error Wilhelm Spickermann
2001-04-04  1:23 ` use_error tmoran
2001-04-06 13:09 ` use_error Michel Gauthier

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