Function MemoTran() Foundation
Replaces hard and soft returns in a character string or memo field.
MemoTran( <cString> , ;
[<cNewHardCR>], ;
[<cNewSoftCR>] ) --> cNewString
The return value of MemoTran() is a copy of <cString> in which the returns are replaced.
The function MemoTran() changes the formatting characters for returns to printable characters. When automatic word wrap is on, MemoEdit() inserts the control characters (Chr(141)+Chr(10)) into the text. These characters (soft returns) must be deleted before output of the text to a printer.
The control characters Chr(13)+Chr(10) (hard return) are inserted by MemoEdit() into the text when the user presses the Return key. Hard returns must be deleted when the contents of a memo field are to be printed as a block paragraph.
// In the example, addresses from an address file are listed
// and the notes (a memo field) are printed in a block paragraph.
// The Epson control characters for block paragraph are sent
// to the printer.
PROCEDURE Main
USE Address NEW
SET PRINTER ON
SET CONSOLE OFF
DO WHILE .NOT. Eof()
? LastName, FirstName
? Street
? City + ",", State, Zip
? Chr(27)+Chr(97)+Chr(3) // Epson control characters for
// block paragraph
?? MemoTran( Notes, " ", " " ) // deletes all returns
// and outputs memo field
?? Chr(27)+Chr(97)+Chr(0) // Epson control characters for
// left justified paragraph
SKIP
ENDDO
SET PRINTER OFF
SET CONSOLE ON
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.