The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ReadHeaderOfASC


Unit:SDL_filesys
Class: none
Declaration: [1] function ReadHeaderOfASC (FName: string; var Comment: string; var NFeat, NObj: integer; var ClInf, NamFeat, NamObj, NominalVars: boolean): integer;
[2] function ReadHeaderOfASC (InStream: TStream; var Comment: string; var NFeat, NObj: integer; var ClInf, NamFeat, NamObj, NominalVars: boolean): integer;

The function ReadHeaderOfASC retrieves the header information of an ASC-formatted data file (version [1]) or a similar stream (version [2]). The parameter FName defines the name of the file to be read, the parameter Instream specifies the stream to be read. On return the function delivers an error code and the following header information:

Comment comment line of header
NFeat number of features
NObj number of objects
ClInf TRUE if class info is included
NamFeat TRUE if names are included
NamObj TRUE if object names are included
NominalVars TRUE if at least one of the variables uses a scale type other than stInterval

Please note, that version [2] of ReadHeaderOfASC starts reading from the current position of the stream.

List of errors:
0 no error
-1 error in specification of number of features
-2 error in specification of number of objects
-3 error in ClInf/NamFeat/NamObj/NominalVars flags
-4 file stored probably in UNIX format


Last Update: 2012-Oct-20