Initializing help system before first use

# XPRMsetdefstream

Purpose
Set default input/output streams.
Synopsis
`int XPRMsetdefstream(XPRMmodel model, int wmd, const char *filename);`
Arguments

model | Reference to a model or NULL
wmd | Stream to set. Possible values:
XPRM_F_READ | Default input stream
XPRM_F_WRITE | Default output stream
XPRM_F_ERROR | Default error stream
XPRM_F_LINBUF | Use line buffering
filename | Extended file name to be used for the stream.

Return value
0 if successful, 1 otherwise.
Further information
1. This function sets default IO streams to be used by a model or by the entire system. Model streams can be changed only when the model is not running. Each stream is associated to an extended file name ( i.e. IO drivers can be used). For output streams, XPRM_F_LINBUF may be specified ( e.g. XPRM_F_WRITE+XPRM_F_LINBUF) in order to enable line buffering for the corresponding stream (the error stream is always open using line buffering).
2. For input and output streams, the filename is stored and streams are actually open when execution of the model starts: in case of an invalid file name, the error is not reported by this function. The error stream is immediately opened so in the case of an invalid file name is detected by this function. If the first parameter is NULL, this function defines the corresponding global stream: it is used as the default when a model is loaded and whenever no model information is available ( e.g. compilation errors, error on modules, etc.). This option can be used only if no model is currently loaded in memory.
3. Using an empty string as the file name implies resetting to the original default stream: for a model this is the corresponding global stream, if no model is provided, this is the operating system stream.
Parent Topic General

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.