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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, PLING_QUERY,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b87bc683630619fa X-Google-Attributes: gid103376,public From: Laurent.Guerby@enst-bretagne.fr (Laurent Guerby) Subject: Re: HELP:Declaration in ADA?!! Date: 1996/03/25 Message-ID: <4xybopb27y.fsf@leibniz.enst-bretagne.fr>#1/1 X-Deja-AN: 144180305 distribution: world sender: guerby@leibniz.enst-bretagne.fr references: <4j65rr$fqg@soleil.uvsq.fr> content-type: text/plain; charset=US-ASCII organization: Telecom Bretagne mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-03-25T00:00:00+00:00 List-Id: Tuyet-Tram DANG-NGOC writes : : Hi there, : : I have a stupid question to ask. : DOES SOMEONE KNOW HOW TO DECLARE LONG_INTEGER IN ADA? with Text_IO; procedure Very_Long is The_Bigger_Absolute_Number_I_Want : constant := 999_999_999_999_999; type My_Very_Long_Integer is range -The_Bigger_Absolute_Number_I_Want .. +The_Bigger_Absolute_Number_I_Want; X : My_Very_Long_Integer := The_Bigger_Absolute_Number_I_Want / 2; begin Text_IO.Put_Line (My_Very_Long_Integer'Image (X)); end Very_Long; With GNAT 3.01 on Solaris (it will also work in Ada 83) : bash$ gnatmake very_long gcc -c very_long.adb gnatbind very_long.ali gnatbl very_long.ali -linkonly bash$ ./very_long 499999999999999 bash$ : All the books I've read here does not answer this metaphysical : question, they just take it as if everyone should know how to declare : it. In a wonderful book, I've seen how to declare LONG_REAL by typing: : type LONG_REAL is DIGIT 14; : But how to do it for LONG_INTEGER? It must be on your book, near the page number 1, how to declare a constrained integer type. : Can someone answers me pleeeeaaaase, i've a big and horrible project : to finish ^^^^^^^^^^^^^^^^ : for very soon. If you don't know the basic of Ada (yes type X is range A .. B is one of Ada's basis), it's hard to achieve a big project in another way than horrible. Also true for any language X. : Thank you very much for having paid attention to my question, and thank you : very very much if you reply. : TRAM : -- : Tuyet Tram DANG NGOC : Licence d'informatique : Universite de Versailles : dangngoc@ens-info.uvsq.fr : http://www.ens-info.uvsq.fr:8000/public/dangngoc/index.html -- -- Laurent Guerby, student at Telecom Bretagne (France), Team Ada -- "Use the Source, Luke. The Source will be with you, always (GPL)" -- http://www-eleves.enst-bretagne.fr/~guerby/ (GATO Project) -- Try GNAT, the GNU Ada 95 compiler (ftp://cs.nyu.edu/pub/gnat)