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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,97a0fb5b3a5bcf2f,start X-Google-Attributes: gid103376,public From: "Robert T. Sagris" Subject: Passing a Command to Unix in Ada Date: 1999/02/06 Message-ID: <36BCB222.EF9B4FF7@physics.BLAH.purdue.BLAH.edu>#1/1 X-Deja-AN: 441467223 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@mozo.cc.purdue.edu X-Trace: mozo.cc.purdue.edu 918336035 10700 128.210.12.17 (6 Feb 1999 21:20:35 GMT) Organization: Purdue University Mime-Version: 1.0 NNTP-Posting-Date: 6 Feb 1999 21:20:35 GMT Newsgroups: comp.lang.ada Date: 1999-02-06T21:20:35+00:00 List-Id: I was wondering if there are any functions similar to the system command in C available in Ada. Also I was wondering if there was a similar function as rename in Ada. If you could give a translation for the following lines it would be most appreciated. *THIS IS NOT HOMEWORK* I am trying to rewrite a little program I wrote in C to Ada but don't no were to look. I have looked through Ada, as a Second Language by Cohen and found nothing useful for this problem Well here are the lines. /*The Header files for the functions*/ #include #include main() { ... /* In particular how would I cobble together some arbitrary string made up of string and integer variables. */ sprintf(command, "ls *%i.%s", some_integer, some_string); /* Is there some equivalent command available in Ada's standard packages? */ system(command); /* I know of the file handling functions in Ada.Text_IO such as Create, Open, Close, Delete etc.. but no Rename. (Is there on?) */ rename(old_file_name_string, new_file_name_string); } Well I hope this doesn't seem to simplistic but I found if I am to general in my questions I get answer that assume I know more about programming in Ada than I do. Well thanks for any help you can give me. Robbi Sagris