Initializing help system before first use

XPRBreadline Method

Read a formatted line from a data file. Anything after a comment (! denotes the beginning of a comment) will be ignored. This will read multiple lines if the line ends with &.

Namespace:  BCL
Assembly: xprbdn (in xprbdn.dll) Version: 45.01.02+1f9fd7ff9a8620394fec1839699751312debed40
Syntax
C#
public int XPRBreadline(
	StreamReader fileStreamIn,
	int maxlen,
	string format,
	out Object[] output
)
VB
Public Function XPRBreadline ( 
	fileStreamIn As StreamReader,
	maxlen As Integer,
	format As String,
	<OutAttribute> ByRef output As Object()
) As Integer

Parameters

fileStreamIn   StreamReader
The open StreamReader to read the data from.
maxlen   Int32
The maximum length of data to read.
format   String
The format to read the data in. This is a string made up of the following formats, seperated by any seperating characters. The format must be exact with respect to spacing (if there are 0+ spaces between the entries then a space " " must be included in the format string). See the BCL example programs for examples of this.
  • {g} – A double value.
  • {i} – An integer value.
  • {t} or {T} – A string value.
  • {s} – A string within single quotes.
  • {S} – A string within double quotes.
output   Object
The out object array. The results from this must be unboxed to the correct type on return and allocated to the relevant variables. See the BCL examples for examples of this.

Return Value

Int32
The integer number of items read, -1 on error.
Example
C#
XPRBprob prob = new XPRBprob("NewProb");
file = new FileStream("TestFileRead.txt", FileMode.Open, FileAccess.Read);
fileStreamIn = new StreamReader(file);
outobj = new object[3];
prob.XPRBreadline(fileStreamIn, 200, "{i}, {g}, {S}", out outobj);
fileStreamIn.Close();
file.Close();
See Also

© 2001-2025 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.