[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
MEMOTRAN()
Replace carriage return/linefeeds in character strings
------------------------------------------------------------------------------
Syntax
MEMOTRAN(<cString>,
[<cReplaceHardCR>],
[<cReplaceSoftCR>]) --> cNewString
Arguments
<cString> is the character string or memo field to be searched.
<cReplaceHardCR> is the character with which to replace a hard
carriage return/line feed pair. If not specified, the default value is
a semicolon (;).
<cReplaceSoftCR> is the character with which to replace a soft
carriage return/line feed pair. If not specified, the default value is
a space.
Returns
MEMOTRAN() returns a copy of <cString> with the specified carriage
return/line feed pairs replaced.
Description
MEMOTRAN() is a memo function that converts a memo field or long
character string containing hard and soft carriage return/line feed
characters into a form that can be displayed. These two character
combinations are end of line formatting indicators placed in the string
by MEMOEDIT(). Soft carriage returns (CHR(141)) are inserted when a
line longer than the width of the MEMOEDIT() window wraps. Hard
carriage returns (CHR(13)) are inserted when the user explicitly presses
Return.
MEMOTRAN() is particularly useful when displaying a memo field in a
REPORT FORM which does not wrap when a soft carriage return is
encountered. MEMOTRAN() resolves this by converting soft carriage
returns to spaces. Note, however, that you must declare MEMOTRAN() as
external using the REQUEST statement if it is used in a REPORT FORM and
not specified anywhere else in the current program.
Examples
. This example strips all end of line characters from a memo
field:
REPLACE Notes WITH MEMOTRAN(Notes)
Files Library is EXTEND.LIB.
See Also:
EXTERNAL*
HARDCR()
REPORT FORM
REQUEST
STRTRAN()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson