Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Two fix possitibilies:</p> <p>1) Instead of the + sign between each string, just use a , instead. It will let Writeln() do the text concatenation.</p> <pre><code> Writeln(F, '"',ACtion,'","', Ini.ReadString('IP_ITS','BAccount','TEST'),'","', FieldByName('PICKCITY').AsString,'","',FieldByName('PICKST').AsString,'","', FieldByName('DROPCITY').AsString,'","',FieldByName('DROPST').AsString,'","', FieldByName('TOT_MILES').AsString,'","',FloatToStr(AWeight),","', FieldByName('LENGTH').AsString,'","',FloatToStr(AStops), '","',''{grosspay},'","',FieldByName('PICK_DATE').AsString, '","',FieldByName('PICK_TIME').AsString,'","',FieldByName('DROP_DATE').AsString, '","',FieldByName('DROP_TIME').AsString,'","',AEquip, '","","',ALTL,'"' , ',"","', '","1","',Ini.ReadString('IP_ITS','BComp','BAccount'),FieldByName('PRO_NO').AsString, '","","","","",""'); </code></pre> <p>2) Use a Format() then an open parameter array - this is my preferred way, because it will be also more easy to fix/maintain</p> <pre><code> Writeln(F, format('"%s","%s","%s","%s","%s","%s","%s", .... [ACtion,Ini.ReadString('IP_ITS','BAccount','TEST'),FieldByName('PICKCITY').AsString, ..... ])); </code></pre> <p>And in all cases, make sure you've set a writing buffer of some size, and are using {$I-}:</p> <pre><code>procedure TClassData.SaveToFile(const FileName: TFileName); var F: system.Text; buf: array[word] of byte; begin {$I-} assign(F,FileName); system.SetTextBuf(F,buf); rewrite(F); if ioresult=0 then begin writeln(F,... ... </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload