comp.lang.ada
 help / color / mirror / Atom feed
* pass a argument to spawn
@ 2016-01-12  1:17 comicfanzine
  2016-01-12  7:05 ` Anh Vo
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: comicfanzine @ 2016-01-12  1:17 UTC (permalink / raw)


Hi , i'm trying to do a simple " ls -a " , on Ubuntu .

I tried to associate a string value , because :

   subtype Argument_List is String_List;

But it failed .

Anyway , i'm lost with all the types and subtypes in GNAT.OS_Lib and System.Strings .

So , i don't know how to proceed in the simplier way .

WITH GNAT.OS_Lib ;	USE GNAT.OS_Lib ;
WITH Ada.Text_IO ;	USE Ada.Text_IO ;

procedure console_Ada is

    state_spawn : boolean ;

    arg : Argument_List ( 1..1 ) ;
    -- here the value must be "-a" .

begin

    new_line ;

    put_line ( " Print of your files :") ;

    new_line ;

	Spawn ( "/bin/ls" , arg , state_spawn );
    -- /bin/ls -a

    new_line ;

    put ( " Execution of the program with Spawn ?  : " & Boolean'Image( state_spawn ) ) ;

end console_Ada ;

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-01-17 17:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-12  1:17 pass a argument to spawn comicfanzine
2016-01-12  7:05 ` Anh Vo
2016-01-12  7:12 ` Per Sandberg
2016-01-12 13:48 ` comicfanzine
2016-01-12 16:10   ` Björn Lundin
2016-01-12 19:36 ` comicfanzine
2016-01-12 20:58   ` Per Sandberg
2016-01-17 17:28 ` comicfanzine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox