comp.lang.ada
 help / color / mirror / Atom feed
From: comicfanzine@gmail.com
Subject: pass a argument to spawn
Date: Mon, 11 Jan 2016 17:17:49 -0800 (PST)
Date: 2016-01-11T17:17:49-08:00	[thread overview]
Message-ID: <ea003744-e675-467f-9534-3305b6c05541@googlegroups.com> (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 ;

             reply	other threads:[~2016-01-12  1:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12  1:17 comicfanzine [this message]
2016-01-12  7:05 ` pass a argument to spawn 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
replies disabled

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