Initializing help system before first use

sysfd: working with system file descriptors

With the sysfd driver a file descriptor provided by the operating system can be used in place of a file. File descriptors are returned by the C functions open or fileno. They also include the default input, output, and error streams (values 0, 1, and 2 respectively) that are opened automatically when a program starts. For instance, to redirect the error stream for a model mod to the default output we may write:

XPRMsetdefstream(mod, XPRM_F_ERROR, "sysfd:1");

Java version of the example

In Java, we use the driver java to indicate redirection to a system stream.

 mod.setDefaultStream(XPRM.F_ERROR, "java:java.lang.System.out");

.NET version of the example

With .NET we can immediately specify an output location, such as

model.SetDefaultStream(XPRMStreamType.F_ERROR, Console.Out);