Indexes   

TextStream (Object)

The textstream object allows to manage input and output for a text stream.

Property Index

AtEndOfLine
Returns a boolean value which specifies if the index position in the stream is at a end of line.
AtEndOfStream
Returns a boolean value which specifies if the index position in the stream is at a end of stream.

Method Index

Close
Closes a text stream.
ReadLine
Returns a string which contains a line of charaters from the current position in the stream.
Read
Returns a string which contains a given number of characters from the current position in the stream.
Write
Writes a string in the text stream.

Properties


o Property AtEndOfLine() As (Read Only)
Returns a boolean value which specifies if the index position in the stream is at a end of line.
Example:
This example retrieves in EndLine the end of line value for the TextStream TestStream.
 Dim EndLine As Boolean
 EndLine = TestStream.AtEndOfLine
 
o Property AtEndOfStream() As (Read Only)
Returns a boolean value which specifies if the index position in the stream is at a end of stream.
Example:
This example retrieves in EndStream the end of stream value for the TextStream TestStream.
 Dim EndStream As Boolean
 EndStream = TestStream.AtEndOfStream
 

Methods


o Sub Close()
Closes a text stream.
Example:
This example closes the TextStream TestStream
 TestStream.Close
 
o Func ReadLine() As
Returns a string which contains a line of charaters from the current position in the stream.
Returns:
oReadLine The retrieved read line.
Example:
This example retrieves the next line of the TextStream TestStream in the stream ReadString.
 Dim ReadString As String
 Set ReadString = TestStream.ReadLine
 
o Func Read( iNumOfChar) As
Returns a string which contains a given number of characters from the current position in the stream.
Parameters:
iNumOfChar
The number of characters to read.
Returns:
oReadString The retrieved string.
Example:
This example retrieves the next fifty characters of the TextStream TestStream in the stream ReadString.
 Dim ReadString As String
 Set ReadString = TestStream.Read(50)
 
o Sub Write( iWrittenString)
Writes a string in the text stream.
Parameters:
iWrittenString
The string to write in the stream.
Example:
This example write a string in the the TextStream TestStream.
 TestStream.Write("This is a test")
 

Copyright © 2006, Dassault Systèmes. All rights reserved.