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,FREEMAIL_FROM,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7d341239f5ebf858,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.icp.pl!newsfeed.atman.pl!not-for-mail From: "Doker" Newsgroups: comp.lang.ada Subject: Big numbers Date: Mon, 18 Apr 2005 12:49:27 +0200 Organization: ATMAN Message-ID: NNTP-Posting-Host: staticline3248.toya.net.pl X-Trace: node2.news.atman.pl 1113820862 88536 217.113.238.132 (18 Apr 2005 10:41:02 GMT) X-Complaints-To: abuse@atman.pl NNTP-Posting-Date: Mon, 18 Apr 2005 10:41:02 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Xref: g2news1.google.com comp.lang.ada:10521 Date: 2005-04-18T12:49:27+02:00 List-Id: program like that one can count only up to 29. what can i do to deal with data up to 100? with Ada.Text_Io; use Ada.Text_Io; procedure Silnia is A : Long_Long_Integer; package Lng_Int_Io is new Ada.Text_Io.Integer_Io(Long_Long_Integer); use Lng_Int_Io; function Silnia ( Liczba : Long_Long_Integer) return Long_Long_Integer is Efekt : Long_Long_Integer := 1; begin for I in 2..Liczba loop Efekt := Efekt * I; end loop; return Efekt; end; begin Put_Line("start"); loop begin New_Line; Put("give a number:"); Get(A); if A >28 then Put_Line ("can't do with this"); raise Constraint_Error; end if; Put ("the result is "); Put(Long_Long_Integer'Image(Silnia(A))); exit; exception when Data_Error => Put("Data Error "); Skip_Line; when Constraint_Error => Put("Constraint Error "); Skip_Line; end; end loop; end Main;