MMO'OTX:  Output to Text

Bit value:  134217728

Causes the updated memo to be output directly to the TEXT parameter in a VROWS by VCOLS array format, instead of being written to disk. This is more efficient that reading a memo one line at a time using MMO'LIN provided you have the memory space for the array. Each line is padded with trailing spaces to fill it out to the array width. As an example:

MAP1 VSPEC

    MAP2 VWIDTH,B,2,60

    MAP2 VROWS,B,2,100

MAP1 MEMO'IN'MEMORY

    MAP2 MEMO'ARRAY(100),S,60

MAP1 TEXT,S,6000,@MEMO'IN'MEMORY

 

The above example illustrates mappings for a physical memo size of 60 columns by 100 rows. The variable TEXT, mapped on top of an array of 100 60-byte lines, will be passed as the TEXT parameter. A single call to INMEMO with opcode set to MMO'OTX will return the memo in the MEMO'ARRAY format, allowing easy access to individual lines.

Note that if MMO'OTX is combined with the MMO'EDT opcode, the file-based memo will be loaded from disk (provided you specify a valid, non-zero CHANNEL parameter), normal editing will take place, and then the memo will be output (returned) to the TEXT parameter instead of writing it to disk. If MMO'OTX is used alone, then no display or editing takes place; the memo is essentially just copied from disk into the memory array.