[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FileAppend Columns



PureBytes Links

Trading Reference Links

I use FileAppend a lot.  The TS 4 feature is clumsy, though, since it
does not include automatic spacing as with the print log.  At least I
don't think it does.  I have been doing the following to get columns to
line up vertically in the file output:

FileAppend(c:\ ..... , NewLine
 + NumtoStr(Date,0) + " "
 + Spaces(5 - StrLen(NumtoStr(Close,2))) + NumtoStr(Close,2) 
 + Spaces(5 - StrLen(<next_value> ,2))) + NumtoStr(Close,2)
 + Spaces(5 - StrLen(<next_value> ,2))) + NumtoStr(Close,2)

The theory is to compute the spaces needed to pad a field from the
next field based on the number of characters in the field.   
But first you convert the field to a string.  Then you print the value,
AFTER converting it to a string (again).

Is this more work than necessary ?

don