Page 2 of 2

Re: HELP: ASCIIOUTPUT issues

Posted: Mon Apr 12, 2021 12:45 pm
by PavoGa
Extending on what Wim has pointed out, simplifying output (and assuming no numeric data that requires formatting:

Code: Select all

DatasourceASCIIQuoteCharacter='';
vTab=Char(9);
vDoubleQuote=Char(39);
asciioutput ( 'c:\file.txt' , EXPAND(%field1%%vTab%%field2%"%vDoubleQuote%s%vTab%%field3%' ));
Or even:

Code: Select all

DatasourceASCIIQuoteCharacter='';
#  Better yet, TAB is implicitly embedded in the output string
vDoubleQuote=Char(39);
asciioutput ( 'c:\file.txt' , EXPAND('%field1%	%field2%"s	%field3%') );
If you do not require formatted numeric data in the output:

Code: Select all

DatasourceASCIIQuoteCharacter='';
# vNumberVar = a constant, calculation result, datasource variable or some combination 
#	without having to do a NumberToString conversion.
# TAB is implicitly embedded in the output string
vDoubleQuote=Char(39);

asciioutput ( 'c:\file.txt' , EXPAND('%field1%	%field2%"s	%field3%	%vNumberVar%') );