我试图写一些文件,但pascal在每个记录的值之间添加了一堆空格,并在一行上放了2条记录。
第一个文件只是一个字符串列表。第二 …
在 objfpc 模式没有 {$H+} , 我猜可能是 row.description 是固定尺寸的Turbo Pascal风格 ShortString 。它长255个字符,这可能就是你获得所有空白的原因。
objfpc
{$H+}
row.description
ShortString
而是将输出文件写为文本文件:
var f: Text; g: Text;
和:
Writeln(g, row.title, ';', row.description);
这应该产生如下文本输出:
Finding Nemo;The adventures of two fish trying to find the lost son of one of them Toy Story;The adventures of a merry bunch of toys
等等