version 2004 (Modified)
USE ASCII MAP (map | *{; mapInOut})
Parameter | Type | Description | |
map | * | String | * | Document name of the map to use, or | |
* to reset to default ASCII map | |||
mapInOut | Number | 0 = Output map | |
1 = Input map | |||
If omitted, output map |
Description
USE ASCII MAP has two forms. The first form loads the ASCII map named map from disk and uses that ASCII map. If mapInOut is 0, the map is loaded as the output map. If mapInOut is 1, the map is loaded as the input map.
The ASCII map must have been previously created using the Web/Options page of the 4D Preferences. After an ASCII map is loaded, 4th Dimension uses the map during transfer of data between the database and a document or a serial port. Transfer operations include the import and export of text (ASCII), DIF, and SYLK files. An ASCII map also works on data transferred with SEND PACKET, RECEIVE PACKET, and RECEIVE BUFFER. It has no effect on transfers of data done with SEND RECORD, SEND VARIABLE, RECEIVE RECORD, and RECEIVE VARIABLE.
If you give an empty string for map, USE ASCII MAP displays a standard Open File dialog box so that the user can specify an ASCII map document. Whenever you execute USE ASCII MAP, the OK system variable is set to 1 if the map is successfully loaded, and to 0 if it is not.
The second form of USE ASCII MAP, with the asterisk (*) parameter instead of map, restores the default ASCII map. If mapInOut is 0, the map is reset for output. If mapInOut is 1, the map is reset for input. The default ASCII map has no translation between characters.
Note: When passing "*" the OK system variable is set to 0.
Example
The following example loads a special ASCII map from disk. It then exports data. Finally, the default ASCII map is restored:
USE ASCII MAP ("MactoPC"; 0) ` Load an alternative ASCII map EXPORT TEXT ([MyTable]; "MyText") ` Export data through the map USE ASCII MAP (*; 0) ` Restore the default map
See Also
EXPORT DIF, EXPORT SYLK, EXPORT TEXT, IMPORT DIF, IMPORT SYLK, IMPORT TEXT, Mac to Win, RECEIVE BUFFER, RECEIVE PACKET, SEND PACKET, Win to Mac.