comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Using Spawn in Win2K
Date: Tue, 7 May 2002 14:34:21 -0500
Date: 2002-05-07T14:34:21-05:00	[thread overview]
Message-ID: <udgb1hnacmmh49@corp.supernews.com> (raw)
In-Reply-To: ab93dh$lkb$1@oanews.nswc.navy.mil

Dave Head wrote in message ...
>Thanks.
>
>I did find CMD.  But this is going to make it more fun to produce
something
>for people with the different OS's and have it work the same...
command.com
>wants to give 8X3 filenames no matter what.  CMD does long filenames,
no
>problem, and by default too.
>
>It must be quitting time somewhere in the world...

Trying to use "spawn" to get a list of files seems like killing a flea
with a cannon. And, as you've found out, its not in the least portable
(even to different versions of windows). There are lots of good uses for
Spawn (or 'Prog_Call' as it is called in Janus/Ada, ...), but this isn't
one of them.

If you need to find a list of information about files in a directory,
you are best off using a package designed for the purpose. The first
choice would be Ada.Directories, but it probably will be a few years
before that is generally available. But there are a lot of other choices
available:

-- Claw.Directories: Windows-specific. Works on any Ada compiler for
Windows. (But it is tied into Claw, so if you're using a different GUI,
or no GUI, it may be a bad choice.)

-- Compiler-specific:
   Gnat.Directories: Gnat-specific. Works (supposedly) on any Gnat
supported OS. Every other Ada compiler has such a library as well.

You also could use Florist or other of the other OS-interface packages.

Any of these choices would be less platform-specific than using Spawn.

            Randy Brukardt.








  reply	other threads:[~2002-05-07 19:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-06 20:44 Using Spawn in Win2K Dave Head
2002-05-06 21:05 ` Dave Head
2002-05-06 23:42   ` Jeffrey Carter
2002-05-07  0:41     ` DPH
2002-05-07  1:47       ` David C. Hoos, Sr.
2002-05-07  8:23         ` DPH
2002-05-06 21:49 ` Stephen Leake
2002-05-07 17:06 ` Björn Lundin
2002-05-07 17:36   ` Dave Head
2002-05-07 19:34     ` Randy Brukardt [this message]
2002-05-07 20:02       ` Dave Head
2002-05-07 23:23         ` Randy Brukardt
replies disabled

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