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=-1.9 required=5.0 tests=BAYES_00,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e34ea6ce50492d0,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-02 15:15:50 PST From: "Ratson Janiv" Newsgroups: comp.lang.ada Subject: generic package Date: Wed, 3 Dec 2003 01:13:00 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 82-166-171-154.barak.net.il X-Original-NNTP-Posting-Host: 82-166-171-154.barak.net.il Message-ID: <3fcd1cfd$1@news.barak.net.il> X-Trace: news.barak.net.il 1070406909 82-166-171-154.barak.net.il (3 Dec 2003 01:15:09 +0300) X-Original-Trace: 3 Dec 2003 01:15:09 +0300, 82-166-171-154.barak.net.il Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!ash.uu.net!news.splitrock.net!nntp02.mcleodusa.net!dimaggio.newszilla.com!sinatra.newszilla.com!news.barak.net.il!not-for-mail Xref: archiver1.google.com comp.lang.ada:3080 Date: 2003-12-03T01:13:00+02:00 List-Id: Hi, I have this code : *************************************************************************** generic type Language is array (Positive range<>) of Character; type States is array (Positive range <>) of Integer; package Automat_Producer is type StatesFunctions is array(Character,Integer) of Integer; procedure Init(Q0:Integer); procedure Change_State(C:Character); function Is_Final_State return Boolean; private Statesarr: Statesfunctions; Currentstate : Integer; FinalStates : States; end Automat_Producer; **************************************************************************** **** I have few Questions: How and when do I set the sizes of the generic types arrays? The compiler need to know the size of the FinalStates:States member, I will know it only during run-time, How do I do it ? I think I need somthing similiar to C++'s Constructor. 10x a lot, Janiv.