comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: Example of Spawn call
Date: Sat, 02 May 2009 20:59:08 GMT
Date: 2009-05-02T20:59:08+00:00	[thread overview]
Message-ID: <wu2Ll.188664$4m1.72034@bgtnsc05-news.ops.worldnet.att.net> (raw)
In-Reply-To: faad1a66-54f0-44dd-bdeb-54f430cd5384@x6g2000vbg.googlegroups.com

The first space in the argument list could be considered as a GNAT BUG 
because the routine "Argument_String_To_List" should truncate all leading 
and tailing spaces before processing the arguments list.

 Args :=3D Argument_String_To_List ( " First -second 3" ) ;

Because I did not try this but what would happen if you tried 

 Args :=3D Argument_String_To_List ( "   First   -second   3  " ) ;

As for the changing the name from "temp.exe" to "temp", must be done in 
Linux as well, but "Daniel" was asking for help with "Windows XP" which 
uses "temp.exe" in this example.


In <faad1a66-54f0-44dd-bdeb-54f430cd5384@x6g2000vbg.googlegroups.com>, sjw <simon.j.wright@mac.com> writes:
>On May 2, 8:38=A0pm, sjw <simon.j.wri...@mac.com> wrote:
>> On May 2, 4:50=A0pm, Hang <xieh...@gmail.com> wrote:
>>
>> > I'm not seeing any problem:
>>
>> > C:\GNAT\Projects\test>test
>> > =A01 =A0=3D> First
>> > =A02 =A0=3D> -second
>> > =A03 =A0=3D> 3
>> > Temp was Spawned Correctly
>>
>> Aside from having to change Program_Name to just "temp", this worked
>> on Mac OS X (GCC 4.3.3). The behavior was subtly different:
>>
>> $ ./test
>> =A01 =A0=3D>
>> =A02 =A0=3D> First
>> =A03 =A0=3D> -second
>> =A04 =A0=3D> 3
>> Temp was Spawned Correctly
>> $
>
>Ah, it's the leading space in the arguments:
>
>  Args :=3D Argument_String_To_List ( " First -second 3" ) ;
>




      reply	other threads:[~2009-05-02 20:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-01 21:39 GNAT on WinXP: System.OS_Lib.Spawn raises Program_Error daniel.wengelin
2009-05-01 21:58 ` Jeffrey R. Carter
2009-05-02  4:16 ` anon
2009-05-02 15:59   ` Martin
2009-05-02 20:39     ` anon
2009-05-02 22:01       ` Ed Falis
2009-05-02 23:20         ` anon
2009-05-03 13:24           ` Ed Falis
2009-05-04  0:22             ` anon
2009-05-04  1:21               ` Ed Falis
2009-05-03 10:33         ` sjw
2009-05-03 13:27           ` Ed Falis
2009-05-04 13:32           ` Robert A Duff
2009-05-03  9:42       ` Martin
2009-05-05  0:04       ` Randy Brukardt
2009-05-05  2:43         ` anon
2009-05-05  8:06           ` Martin
2009-05-05 23:40             ` Randy Brukardt
2009-05-02 20:31   ` daniel.wengelin
2009-05-03  2:22     ` Hang
2009-05-02  6:28 ` Example of Spawn call anon
2009-05-02 15:50   ` Hang
2009-05-02 18:28     ` anon
2009-05-02 19:38     ` sjw
2009-05-02 19:47       ` sjw
2009-05-02 20:59         ` anon [this message]
replies disabled

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