From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!telesoft.UUCP!keith From: keith@telesoft.UUCP (Keith Shillington @prodigal) Newsgroups: comp.lang.ada Subject: Ada type question Message-ID: <8901061625.AA00522@ucsd.edu> Date: 6 Jan 89 15:09:53 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: -- To define an array type: type x is array(integer range 1..10) of character; -- Would define a ten element array of characters. "Better" Ada would be: subtype x_range is integer range 1..10; type x is array(x_range) of character; -- More flexible would be: type x is array(integer range <>) of character; subtype working_x_range is integer range 1..10; subtype large_x_range is integer range 0..1000; subtype working_x is x(working_x_range); subtype large_x is x(large_x_range); -- Then you can define your index variables of an appropriate type to work -- with the objects that you define of the various x subtypes. -- Keith Shillington, Education Group, TeleSoft