TCSVRecordProc procedure type
Defines a procedure used to process field values.
Declaration
TCSVRecordProc = procedure(Fields: TStringList) is nestedArguments
Fields | TStringList used to store comma-separated field values. |
Description
TCSVRecordProc defines a nested procedure type used when reading
and processing delimited field values. A TCSVRecordProc reference is passed
as an argument to the
LoadFromCSVFile and
LoadFromCSVStream routines. Applications must create a procedure
that performs actions required when a line of data has been read from its
source and separated into individual field values.
The Fields argument is a TStringList instance which contains the field values converted and parsed in the calling routine. Each field value exists on a separate line in the Fields argument. A field with no value is represented as an empty line in the TStringList instance.
An application must implement a procedure using the signature in TCSVRecordProc, and pass its address as an argument to the LoadFromCSVFile or LoadFromCSVStream routine. The procedure is responsible for performing any actions needed for the values in Fields.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
