Sorting filePro Arrays
Fairlight
fairlite at fairlite.com
Sun May 18 17:42:29 PDT 2008
In the relative spacial/temporal region of
Sun, May 18, 2008 at 06:20:18PM -0400, Bob Stockler achieved the spontaneous
generation of the following:
> That worked on Windows Me and the filePro version I had on it in
> 2003 when I wrote to programs, but it doesn't now on Windows XP
> and the latest version of filePro.
>
> The array is written out to a tempory file OK, but the file to
> which SORT's output is redirected doesn't contain anything. I
> got a command ("cmd") prompt and executed:
>
> SORT sort.tmp > sorted.tmp
>
> and it worked as expected, but doing the same thing with filePro's
> SYSTEM command no longer works. Here is the significant code:
>
> If: DOS
> Then: TEMP1 = "C:\temp\sort.tmp"
> If: DOS
> Then: TEMP2 = "C:\temp\sorted.tmp"
> If: DOS
> Then: system noredraw "SORT" < TEMP1 < ">" < TEMP2
>
> The file "sorted.tmp" is created, but doen't contain the redirected
> output of SORT.
>
> Can anyone offer any suggestions?
Yeah, I -think- I have a sane one. Use 'start' as a prefix for the whole
command. Redirection is kind of funky in Windows, as it's reliant on the
command interpreter--which start will invoke. If you do a straight
system() call, redirects tend not to work. I think another part of the API
is used for that inside fP.
If 'start' prepended to the command actually works, then you're going to
get a secondary window in the interim while it "forks off" (asynchronously,
of course). You can suppress that with one of the flags to start. I
believe it's /B. The start command has its own help, so it's not hard to
find.
Every time I've run into redirect issues in Windows, this has been the
silver bullet.
HTH.
mark->
--
"Moral cowardice will surely be written as the cause on the death
certificate of what used to be Western Civilization." --James P. Hogan
More information about the Filepro-list
mailing list