VS:StdReadLn: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
No edit summary
 
Line 10: Line 10:
Supported data types include INTEGER, REAL, LONGINT, CHAR or STRING. Non STRING data values must be separated by a tab or space to be correctly read into variables. If the procedure encounters an EOF(end-of-file) marker, an error is generated. StdReadLn positions the file position pointer to the beginning of a new line after the procedure is called.
Supported data types include INTEGER, REAL, LONGINT, CHAR or STRING. Non STRING data values must be separated by a tab or space to be correctly read into variables. If the procedure encounters an EOF(end-of-file) marker, an error is generated. StdReadLn positions the file position pointer to the beginning of a new line after the procedure is called.


StdReadLn reads data according to the Pascal language standard. This differs from the ReadLn procedure found in VectorScript primarily when reading STRING data. StdReadLn will read all characters, including tabs and spaces, as a single string value. ReadLn will detect tabs as delimiters, allowing multiple string values to be assigned to variables.
StdReadLn reads data according to the Pascal language standard. This differs from the [[VS:ReadLn]] procedure found in VectorScript primarily when reading STRING data. StdReadLn will read all characters, including tabs and spaces, as a single string value. [[VS:ReadLn]] will detect tabs as delimiters, allowing multiple string values to be assigned to variables. Additionally, [[VS:ReadLn]] will read UTF-8 encoded files.


</desc>
</desc>

Latest revision as of 13:54, 27 August 2018

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Procedure StdReadLn will read data from a currently open text file. The variable length parameter list returns the read data in the specified parameters.

Supported data types include INTEGER, REAL, LONGINT, CHAR or STRING. Non STRING data values must be separated by a tab or space to be correctly read into variables. If the procedure encounters an EOF(end-of-file) marker, an error is generated. StdReadLn positions the file position pointer to the beginning of a new line after the procedure is called.

StdReadLn reads data according to the Pascal language standard. This differs from the VS:ReadLn procedure found in VectorScript primarily when reading STRING data. StdReadLn will read all characters, including tabs and spaces, as a single string value. VS:ReadLn will detect tabs as delimiters, allowing multiple string values to be assigned to variables. Additionally, VS:ReadLn will read UTF-8 encoded files.

PROCEDURE StdReadLn(
VAR z :ANY);
def vs.StdReadLn():
    return z

Parameters

z ANY

Example

VectorScript

GetFile(fName);
IF NOT DidCancel THEN BEGIN
Open(fName);
StdReadLn(partID,partName);
END;

Python


Version

Availability: from VectorWorks8.0