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,3d0e3853cc52ad5 X-Google-Attributes: gid103376,public From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk) Subject: Re: help about execute a command Date: 1998/08/07 Message-ID: #1/1 X-Deja-AN: 378939249 References: <6qddcf$2mr$1@nnrp1.dejanews.com> Organization: * JerryWare *, Leiden, Holland Newsgroups: comp.lang.ada Date: 1998-08-07T00:00:00+00:00 List-Id: jtapasai@my-dejanews.com wrote: : I am learning ADA 95 with gnat 3.10 under linux, and I must write a program : that executes a command of the operating system such as ls,insmod , cp ... Is : that possible ? Thanks in advance ! with Interfaces.C; procedure Show is function System (Cmd : String) return Integer is function C_System (S : Interfaces.C.char_array) return Integer; pragma Import (C, C_System, "system"); begin return C_System (Interfaces.C.To_C (Cmd)); end System; pragma Inline (System); Result : Integer; begin Result := System ("ls"); end Show; I notice that the last three question you asked here could all have been easily answered by looking in the index of an good Ada reference book. I suggest you really should get one of those books. My own preference is for 'Ada as a second language' by Norman Cohen. Jerry. -- -- Jerry van Dijk | email: jdijk@acm.org -- Leiden, Holland | member Team-Ada -- Ada & Win32: http://stad.dsl.nl/~jvandyk