Re: File_Type

From: sk (noname_at_myob.com)
Date: 04/19/04


Date: Sun, 18 Apr 2004 17:02:20 -0500
To: comp.lang.ada@ada-france.org


> Is there anyway to use an Integer Type like a File_Type?,
> Is there anyway to asign a File_Type the value 3?

1) Are you using GNAT ?
2) Are you trying to associate the standard C/Unix integer
file types to Ada file types ?
3) Are you comfortable with Ada ?

If so, look at Gnat.Os_Lib and how the File_Descriptor
is defined; look at Interfaces.C_Streams. I vaguely
remember, AND I COULD BE WRONG, that there are conversion
functions somewhere in the GNAT supplied libraries.

... if you answered yes to #3, then you should be able
to use UC to get what you need.

... if you answered no to #3, I would search for other
solutions.

-- 
-------------------------------------------------
-- Merge vertically for real address
--
--     s n p @ t . o
--      k i e k c c m
-------------------------------------------------


Relevant Pages

  • Re: Ada.Strings.Bounded
    ... integer type are the values from 0 to one less than the modulus, ... the compiler must calculate the right answer. ... For static expressions, "+" is not a partial function. ... GNAT compiled it without a problem and it ran without error. ...
    (comp.lang.ada)
  • Re: Ada.Strings.Bounded
    ... integer type are the values from 0 to one less than the modulus, ... The overload resolution in the present example, though, doesn't seem ... GNAT compiled it without a problem and it ran without error. ... GNAT compiles this one fine and runs fine, ...
    (comp.lang.ada)