Macro command TfWrite

<< Click to Display Table of Contents >>

Navigation:  Macros > Macro commands and parameters > Macro reporting commands > Macro write to a text file >

Macro command TfWrite

Purpose:

Write to one line of a text file

 

General notation:

TfWrite( FileIndex, value1 [ , value2 [ , value3 ... ] ] )

 

The separator has been defined by TfOpenForWrite and will be written between the values.

Text values will be written as text.

Text values with additional quotation marks will be written between quotation marks.

The command TfWrite generates no line feed.

 

Example:

 TfOpenForWrite( 1, 'output.txt' )

 Set( a, 1.2345 )

 TfWrite( 1, ''one'', 2, 3, 4, 'five', 6, a:6:2 )

 TfWrite( 1, ''one'', 2, 3, 4, 'five', 6, a:6:2 )

 TfClose(1)

 

Results in:

'one';2;3;4;five;6;  1.23;'one';2;3;4;five;6;  1.23

 

See also:

TfOpenForWrite

TfWriteLn

TfClose

 

Back to reporting commands.