Re: File_Type

tmoran_at_acm.org
Date: 04/18/04


Date: Sun, 18 Apr 2004 20:47:03 GMT


>Is there anyway to use an Integer Type like a File_Type?,
>Is there anyway to asign a File_Type the value 3?
  Perhaps you want an array
    File_List : array(1 .. 10) of File_Type;
    ...
    Open(File_List(3), ...
Or perhaps you are thinking of some systems' (eg DOS) small integer
file handles - 0=stdin, 1=stdout, 2=stderr, 3=aux, 4=prn? Ada.Text_IO
has routines to convert the first three to File_Type:
  function Standard_Input return File_Type;
  function Standard_Output return File_Type;
  function Standard_Error return File_Type;



Relevant Pages

  • Re: strcpy - my implementation
    ... Since you're initialising an array of integers, ... If the type were non-integer (e.g. pointer, or floating point, or struct ... integer type can safely be initialized with memset, ...
    (comp.lang.c)
  • Re: how to "put" a binary structure? (newbie question!)
    ... I'm a newbie to Ada programming and> therefore please excuse if my question might be silly or stupid. ... Array of bits, like array of Boolean or of Bit_T ... Modular integer type mod 2**8, Unsigned_8> How can I correct the source code to print the values stored in the> structure Xxx? ...
    (comp.lang.ada)
  • Re: String or Numeric Variable?
    ... Why bother even having a BYTE type, or an INTEGER type? ... Some VB and Windows functions take Integers, not Longs, i.e. the VB graphic ... IF you have a large array, say 100K or more, then it might make sense to use ... own set of flags. ...
    (comp.lang.basic.visual.misc)
  • Re: Address of an array = address of its 1st element: undecidable question ?
    ... integer type is a subrange of the corresponding ... as well be interpreted as an array of two shorts or an array ... But a reasonable extension of the standard's definition of "value" ...
    (comp.lang.c)
  • Re: Type of argc
    ... I think I'll have to quote older posts: ... provides any benefits over any other integer type, signed or unsigned, ... With size_t, this cannot be the case, because, the size of the array of char* must be smaller or equal to SIZE_MAX. ...
    (comp.std.c)