openpipe


Purpose
Start an external process for bidirectional communication.
Synopsis
procedure openpipe(cmd:string|text)
Argument
cmd 
The command to be executed in the separate process
Example
The following example uses an external program sort (we assume it writes a sorted copy of what it reads) to display a sorted list of the content of set ToSort:
openpipe("sort")
forall(i in ToSort)
 writeln(i)
fclose(F_OUTPUT)

while(not iseof) do
 readln(l)
 writeln(l)
end-do
fclose(F_INPUT)
Further information
1. Pipes required by this procedure are created using the pipe driver of this module (see Section Driver pipe). As a consequence, the string provided as argument must be suitable for the driver (i.e. a program name followed by its options separated by spaces).
2. This procedure opens both an input and output streams that must be closed explicitly using fclose. Note that the output stream must be closed first otherwise the program may lock up.
3. When Mosel is running in restricted mode (see Section Command line interpreter: restricted mode), the restriction NoExec disables this routine.
Module
mmsystem


If you have any comments or suggestions about these pages, please send mail to support@fico.com.

© Copyright 2001-2013 Fair Isaac Corporation. All rights reserved.