PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Array Questions

Kornalius,

I've read in a file into a buffer And want to write parts of it back out.

Code:

sdim (TempBlock$, TBYTE, 512);
ReadResult$ = fread (TempBlock$, 1, vmax (TempBlock$), hIn$);
...
fwrite(TempBlock$[StartIndex$], 1, CharIndex$ - StartIndex$, hOut$);


TempBlock$[StartIndex$] doesn't give me data that looks like it came from the file. Can you point out my error, is this a bug, or would you like to see my code?

Brad

UPDATE: Could this be the Compiler Loop Addressing bug you mentioned in your update note from today?

Another UPDATE: My fread statements no longer execute in the new version. Do I now need to derefference the buffer?
Looks good to me, I will try it out and get back to you.
Hi Brad,

I just fixed the problem. It was introduced when I reprogrammed the pointer system. It's working now.