Board index » delphi » Help: Unfamiliar type declaration

Help: Unfamiliar type declaration

        In a program I am modifying, I have run across a type declaration that
        I haven't found any documentation on.  The code is as follows:

        type
             WinType : Ag..Nul;

        var
             array [1..Constant] of WinType;

        In the code I have seen an A and a D (not with '', if I am not
        mistaken).  The problem is this.  I have tried to assign an X to
        an element in the array but I get a compiler error saying that it
        is not valid.  

        If anyone knows what the legal values are for this array and where I
        can find information about this type, it would be greatly appreciated.

        Michael

        re...@gas.uug.arizona.edu

 

Re:Help: Unfamiliar type declaration


Quote
>         In a program I am modifying, I have run across a type declaration that
>         I haven't found any documentation on.  The code is as follows:

>         type
>              WinType : Ag..Nul;

>         var
>              array [1..Constant] of WinType;

>         In the code I have seen an A and a D (not with '', if I am not
>         mistaken).  The problem is this.  I have tried to assign an X to
>         an element in the array but I get a compiler error saying that it
>         is not valid.

>         If anyone knows what the legal values are for this array and where I
>         can find information about this type, it would be greatly appreciated.

   These are user-defined values, which may be used in further
definitions and declarations.  Somewhere in your program or its global
Units, the constants Ag, Nul, and Constant are defined.  The type
definition is stating a _subrange_ type, which is a portion of some
previously-defined data type (I can't tell what it is from only this code
snippet), and the Var declaration is an array of that type which has the
dimension of 1..Constant (whatever value that constant has been defined).
I can't tell you any more, but these are legal Pascal
definitions/declarations, providing the supporting definitions exist
somewhere in the "system".

Re:Help: Unfamiliar type declaration


Reposting article removed by rogue canceller.

        In a program I am modifying, I have run across a type declaration that
        I haven't found any documentation on.  The code is as follows:

        type
             WinType : Ag..Nul;

        var
             array [1..Constant] of WinType;

        In the code I have seen an A and a D (not with '', if I am not
        mistaken).  The problem is this.  I have tried to assign an X to
        an element in the array but I get a compiler error saying that it
        is not valid.  

        If anyone knows what the legal values are for this array and where I
        can find information about this type, it would be greatly appreciated.

        Michael

        re...@gas.uug.arizona.edu

Re:Help: Unfamiliar type declaration


Reposting article removed by rogue canceller.

Quote
>         In a program I am modifying, I have run across a type declaration that
>         I haven't found any documentation on.  The code is as follows:

>         type
>              WinType : Ag..Nul;

>         var
>              array [1..Constant] of WinType;

>         In the code I have seen an A and a D (not with '', if I am not
>         mistaken).  The problem is this.  I have tried to assign an X to
>         an element in the array but I get a compiler error saying that it
>         is not valid.

>         If anyone knows what the legal values are for this array and where I
>         can find information about this type, it would be greatly appreciated.

   These are user-defined values, which may be used in further
definitions and declarations.  Somewhere in your program or its global
Units, the constants Ag, Nul, and Constant are defined.  The type
definition is stating a _subrange_ type, which is a portion of some
previously-defined data type (I can't tell what it is from only this code
snippet), and the Var declaration is an array of that type which has the
dimension of 1..Constant (whatever value that constant has been defined).
I can't tell you any more, but these are legal Pascal
definitions/declarations, providing the supporting definitions exist
somewhere in the "system".

Other Threads