11 hours ago
(11 hours ago)mdijkens Wrote: I did experiment with the _MEM(sql$) but the PUT #1, , LEFT$(sql, mpos) still makes a copy in memory.
The only way to print it to file without would be to print it at set sizes
FOR i = 0 to mpos -1000000 STEP 1,000,000 'write one 1MB to drive at a time
PUT #1, , _MEMGET(m, m.offset + i, STRING * 1000000)
NEXT
'after 999 writes you've now written 999,000,000
'if your file was 999,999,999 bytes in size, just make a temp string with the 999,999 leftover bytes and write it last. There won't be much overhead in the creation of a temp string of that size in your program.