Navigation: Language Reference > 4 - Entity Declarations > File Structures >====== MEMO (declare a text field) ====== | ![]() ![]() ![]() |
label | MEMO(length) [,BINARY] [,NAME( )] |
label | The label of the MEMO (PROP:Label). |
MEMO | Declares a fixed-length string which is stored variable-length on disk per record. |
length | A numeric constant that determines the maximum number of characters. The maximum range is unlimited in 32-bit applications (dependent on the file driver's MEMO support). |
BINARY | Declares the MEMO a storage area for binary data (PROP:BINARY). |
NAME | Specifies the disk filename for the MEMO field (PROP:NAME). |
MEMO declares a fixed-length string field which is stored variable-length on disk. The length parameter defines the maximum size of a memo. A MEMO must be declared before the RECORD structure. Memory is allocated for a MEMO field's buffer when the file is opened, and is de-allocated when the file is closed. MEMO fields are usually displayed in TEXT fields in SCREEN and REPORT structures.
Generally, up to 255 MEMO fields may be declared in a FILE structure. The exact size and number of MEMO fields, and their manner of storage on disk, is file driver dependent.
You can also use string slicing operations for MEMOs.
Example:
Names FILE,DRIVER('Clarion'),PRE(Nam)
NameKey KEY(Nam:Name)
NbrKey KEY(Nam:Number)
Notes MEMO(4800) !Memo, 4800 bytes
Rec RECORD
Name STRING(20)
Number SHORT
END
END
See Also: String Slicing