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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9384451580450d27 X-Google-Attributes: gid103376,public From: "bklungle" Subject: Re: comand line arguments Date: 1997/10/10 Message-ID: <01bcd545$f326d780$68491ecc@p5120>#1/1 X-Deja-AN: 279232666 References: <343D6FC1.7B3B@unx1.shsu.edu> Organization: B & D Associates X-NETCOM-Date: Fri Oct 10 1:23:27 AM CDT 1997 Newsgroups: comp.lang.ada Date: 1997-10-10T01:23:27-05:00 List-Id: Here is a little something I played around with a while ago. Just a quick hack. cheers...bob with ada.command_line; with fibonacci; with text_io; procedure fib is package acl renames ada.command_line; package txo renames text_io; package iio is new txo.integer_io(integer); function argc return natural renames acl.argument_count; function argv(Nr : positive) return string renames acl.argument; n : integer; begin if argc = 1 then n := integer'value(argv(1)); if n >= 0 then txo.put("fib("); iio.put(n, 1); txo.put(") is "); iio.put(fibonacci.fib(n), 1); txo.new_line; txo.new_line; else txo.put_line("number must be >= 0"); end if; end if; exception when others => txo.put_line("fib: unknown exception"); raise; end fib; ucs_rat@shsu.edu wrote in article <343D6FC1.7B3B@unx1.shsu.edu>... > Could some one give me a quick snibbit of code to do simple command line > aruguments in GNAT Ada95. IF there are any necessary with and use > declartions would you let me know about them too? It doesn't have to be > complex just some basic commands that cuold be done from batches...just > would rather wrapp is all up in one tight ada program. > > Thanks for the help, > > Robert A. Thompson >