On 3/5/23 12:54 PM, Travis Siegel via fpc-pascal wrote:
[...]
This reminded me that I used to do this exact thing under turbo pascal by using
blockread/writes, and treating the text file as a binary one. This allowed me to
make changes without having to rewrite the whole file, something even ini
On Sun, Mar 5, 2023 at 7:02 PM Travis Siegel via fpc-pascal
wrote:
> On tp, I could open a file with a blocksize of 1,
>
> reset(file1,1);
>
...
> For example.
>
> Let's say I have a 5 byte string:
>
> st1 := '12345';
>
> Now, if I blockwrite this to the file under tp:
>
> blockwrite(f1,st1);
T
Hi,
you can use PChar, or string+retype to PChar in blockwrite:
BlockWrite(f1, PChar(s)^, length(s));
which gives expected result.
V.
__
Od: "Travis Siegel via fpc-pascal"
Komu: "FPC-Pascal users discussions"
Datum: 05.03.2023