New Function in 8 - MemoChunk() function to unwind a Memo field (Ver. 220.127.116.118)
We have now looked at a lot of functions that manipulate,extend, copy and append to a Memo field.
What about "normalising" it again. A lot of you traditionalist, don't and never will trust a memo field, and anyhow, even us "extremists" can't use traditional DataEase functions on a Memo field.
Maybe there is times we want to unwind a Memo field and save it in a normal DataEase table structure. It is not such a big defeat, we can simply rebuild it if we like with the MemoMemoCopy Function etc.
Chunk# is proper Data techy, 0 is the first, 1 is the second, 2 is the third and on we go...Why make it easy?
MemoChunk(MemoToChunk,0) will return the first 256 bytes of the memo field , and MemoChunk(MemoToChunk,1) the next 256 and so we go.
So how do I know when I have reached the end of the Memo?
Firstly this is proper DataEase functionality, it will not GPF even though you try to take a chunk that doesn't exist, so don't worry. It will simply return nothing, like a good little boy, and this is how you can tell that you have come to the end...
When MemoChunk(MemoToChunk,N) returns blank, it is all over.