"Personal Write 4.1 - 6. The File Format Menu" 6. The File Format Menu 6.1 Encryption Key 6.2 Character Set 6.3 Defaults 6.3.1 End of Line/Paragraph 6.3.2 TAB Step 6.3.3 TABs in Output File 6.3.4 Grave Accent Expansion 6.3.5 SGR > 4 in PRINT ANSI 6.3.6 Use Pad Bytes in Clipboard IFF 6.3.7 Backup previous saved 6.3.8 Correct errors in ASCII/ANSI files 6.3.9 Save ANSI using PP codes 6.3.10 Save printer settings with document 6.3.11 Overwrite existing icons 6.4 Mail Merge 6.4.1 Manual and Automatic Translation 6.4.2 Field and Record Delimiters 6.4.3 Character String Delimiter 6.4.4 Comment Delimiters 6.4.5 End of File Character 6.5 Default Directory 6.6 File Requester 6.6.1 Sort Order 6.6.2 Sort by Date or Name 6.6.3 Show Comments "Personal Write 4.1 - 6. The File Format Menu" 6. The File Format Menu This menu contains the menu items necessary to modify some of the parameters used by the functions which perform file operations. 6.1 Encryption Key The meaning and use of the encryption key is described in section 2.6.5. This requester is used to set or modify the encryption key. The last key which was written remains stored (but unreadable) until a new key is written, or Personal Write is terminated. The encryption key is cleared whenever the requester used to write a new key is displayed. The requester can be used both for writing a key, or for quickly clearing the last used key. Only two characters at a time are displayed in the string gadget of the requester. This prevents the "casual" observer from reading the entire key from the computer's screen. The maximum length of the key is 50 characters. If the PROCEED gadget is selected immediately after the requester is displayed, no encryption key will be present in the computer's memory. No CANCEL gadget exists, so it is impossible to re-use the previously written key, unless it is written again. After the key has been written once, Personal Write displays a second requester to write the same code again. In this way a mistyped key cannot be used by mistake to save a document, which then could not be loaded again using the correct key. Personal Write displays an error message if the control key is different from the first key. Neither the file name, nor a comment associated with the file (sections 2.6 and 6.6) are encrypted. This function can be selected by pressing while the key is held down. 6.2 Character Set Different character sets can be used by Personal Write to read and write files. As described in section 2.6, this can be done using the ASCII and ANSI X3.64 formats. The user informs Personal Write about which set is to be used to read and/or write a file in the above described formats by selecting one of the over 25 gadgets associated with the different character sets. The character set must be selected before the document is loaded (section 2.4), if a text written using a character set different from the current one is to be loaded. However if a document has to be stored using a new character set, the set must be selected before the document is saved (section 2.6). A set used to both load and store files needs to be selected only once. The Amiga character set, which guarantees compatibility with other programs on the same computer, is used by default. If data is to be exchanged between computers, the ASCII format (which usually is an extended version of the original 7-bit ASCII set), or plain text (without formatting data) should be selected in the load/save text parameters of the programs being used. On some programs which do not have a "Save ASCII" function, the text can be saved by using the "Print to File" option. The only real ASCII standard for 7-bit character codes is the one associated with the 7USA gadget. The first four gadgets refer to the most commonly used character sets on the systems whose name is displayed. The IBM PC set (Code Page 437) can also be used to process the text output by an Amiga printer driver, redirected to a file with the "Cmd" program. This character set is the most widely used among personal printers, but some printers (e.g. HP LaserJet) may use other encodings. The following eight sets are those of the Commodore CBM and C64 computers. These computers have two sets of screen character codes (SCR1 and SCR2), and two sets of text mode codes (CHR1 and CHR2). The first two sets are those which can be used to display characters on the screen with the "Poke" Basic command. The other two sets can be printed with the "Chr$()" command. Other two gadgets, with the same names as the standards, follow in the list. Code Page 850 (CP 850 gadget) is the character set used on newer PC operating systems. Code Page 850 has more national characters than CP 437 ("old PC"). The last 12 gadgets refer to the national 7-bit ASCII codes. In these sets, the most commonly used national characters of each language are inserted in place of some less used characters (e.g. '[' and '\') of the standard ASCII set (i.e. 7USA). A text can, of course, be loaded in one format and stored using a different set. If, for example, a text written using a Commodore CBM 8xxx computer with German keyboard has to be read, the text must first be loaded using the CBM gadget associated with the character codes used by the program which originally saved the text (e.g. CBM SCR1). Then, the text must be saved after having selected the 7USA gadget. Finally, the 7DEU gadget must be selected (to translate German national characters) and the text can be re-loaded. The displayed text can then be stored in any format. In some cases, Personal Write cannot convert one or more characters from one set to another. This may occur if the selected character set does not contain all the codes which should be read or written. In these cases, Personal Write replaces the character which cannot be converted with a similar one. Personal Write can also expand the character into a series of multiple characters (e.g. 'ß' becomes "ss", and the "one half" sign is expanded to '1'+'/'+'2'). If the document language is Italian (section 5.8.1), Personal Write can convert final accented vowels into vowels followed by a diacritical sign, as described in section 6.3.4. Vowels with dieresis are expanded following German rules, if the selected document language is German. Diacritical signs are removed from the letters if no conversion into the selected set is possible and the document language does not have any particular translation rules. Some programs, on the Amiga and other computers, use non-standard character sets. To load such a text with Personal Write it is not sufficient to select the gadget corresponding to the character set used by the system in which the text was written. The text must first be saved with the "Save ASCII", "Print to File" or similar option of that program. Texts may be transferred to the Amiga from other systems using dedicated software. The character set conversion of Personal Write can then be used to convert the text to the Amiga set. If Personal Write is used for this purpose, any similar options of the transfer program used to read the text stored in the other computer's format should be disabled. If the character set conversion is done by the transfer/communications program, it does not need to be done again by Personal Write, and vice versa. The default Amiga font is always used to store and display the text internally. 6.3 Defaults In addition to the character set described in section 6.2, some additional parameters control the file read/write operations in the ASCII, ANSI X3.64 and clipboard IFF formats. 6.3.1 End of Line/Paragraph The Line Feed (ASCII LF, decimal code 10) code is normally used by the Amiga and Personal Write to mark the end of a line or a paragraph. If the text is to be stored in a format that requires different end of paragraph/line codes, this can be specified with the parameter which is described here. Three gadgets can be selected. These activate respectively the LF, CR and CR+LF end of paragraph/line codes. CR stands for Carriage Return (decimal ASCII code 13). When Personal Write loads a text file all different end-of-line codes are translated in LF codes. Personal Write always displays one single paragraph sign on the screen where any of the three codes appears in the text file. This function can be very useful if files to be sent to an electronic bulletin board service must be prepared. Some communication protocols require other codes than LF. This may also be necessary for other computers or text editors to which a text written with Personal Write must be transferred. The following example explains how different functions of Personal Write can be combined to send a text with some characters having codes greater than 127 (e.g. German or Italian national characters) to an electronic bulletin board service (BBS) which uses only 7-bit codes and requires a CR+LF sequence at the end of each line. The original text is divided into long paragraphs, while the BBS does not accept lines longer than 60 characters (plus the end of line codes). The text must also be properly formatted (e.g. aligned on both margins) and divided into pages, since it is to become part of an on-line documentation. The first thing to do after the text has been written is to save it as a standard document (e.g. in compressed format) so that it can later be re-edited. Then the 7-bit character set accepted by the BBS must be selected (section 6.2). If the BBS does not accept national characters 7USA should be selected; otherwise the appropriate national 7-bit set can be used. The text must be saved (with a different name from that of the file used to store an editable copy of the text) in ASCII format (or ANSI X3.64, if the BBS accepts the control sequences used by this format), so that Personal Write can convert the characters with a code greater than 127 (8-bit codes). The 7-bit version of the text must be loaded, without modifying the character set. At this point the displayed text does not contain any more characters with code greater than 127, but the paragraphs are still not formatted correctly into lines, nor has the correct end of line code been used. The correct document margin of 60 should be set (supposing that this is the limit set by the BBS), and the text saved in PRINT ASCII (or PRINT ANSI) format. The text must be loaded again. The displayed text will appear formatted as specified through the document and paragraph format parameters (true WYSIWYG, What You See Is What You Get). Now the end of line parameter should be set to CR+LF and the text saved again in ASCII format (or ANSI X3.64, but not in PRINT ASCII/ANSI formats). This last step is necessary because the specified end of line codes (CR+LF, in this case) are not used when a text is printed, but only when it is saved in ASCII or ANSI X3.64 format. The text file can be processed by a terminal program, or sent directly to the BBS. 6.3.2 TAB Step Some programs use the TAB code (ASCII code 9, also called HT, meaning "Horizontal Tab") to replace a series of space characters in a file. A TAB code inserted in a file tells the program that the following character must be placed on the next TAB position when displayed. This saves space characters. Standard TAB positions appear every 8 columns. This means that there are TAB positions on column 1, 9, 17 etc. If a TAB step other than 8 is defined, the positions are re-distributed accordingly. The step which can be defined through this parameter is used by Personal Write to interpret the meaning of TAB codes found in text files. The TAB positions described here have nothing to do with the positions which may be accessed through the keyboard key, as described in section 1.12.11. In some cases (e.g. to programmers), it may be useful to define the same positions for keyboard Tabs and these TABs. 6.3.3 TABs in Output File TAB codes are, by default, not inserted in the files stored by Personal Write. The use of TAB codes can be very useful in particular situations. Personal Write can be used to store a space-optimized program source code (e.g. in C, Pascal or other language where indentation is used). The use of the TAB code can make files much more compact, eliminating the space normally used by long sequences of space characters. Personal Write can re-format a program source code text written with a text editor. Personal Write can eliminate space characters in excess, replacing them with as many TAB characters as possible, where this saves memory. Spaces immediately preceding end-of-line codes are completely removed. If the YES gadget is selected, TAB codes will be used wherever possible when texts are stored in the ASCII or ANSI X3.64 formats. Personal Write can also do the opposite, replacing all TABs with spaces. To do this, the NO gadget must be selected before the text is saved. The new AUTO setting allows for TAB characters to be saved if and only if TAB characters were found when loading the original file. This is useful for editing special files, like the user interface files of Personal Paint, without having to remember whether TABs are to be used or not. This is the new default setting. 6.3.4 Grave Accent Expansion This parameter is useful when processing texts written in languages where accented vowels can be expanded. In some cases in which the grave accent ('\', '`') cannot be placed over a vowel, Personal Write may have to put it after the letter (expanding the single letter). This can happen during a conversion between character sets (not all character sets have all accented vowels) or during an error correction operation, depending on the selected document language. An isolated grave accent ('`', ASCII code 96) is not always correct or nice to see, if it is put after a vowel. It may often be preferable to use an apostrophe, or acute accent (''', ASCII code 39) instead. This problem of course does not exist for some languages. This parameter allows the user to select the character to expand the grave accent. 6.3.5 SGR > 4 in PRINT ANSI This parameter lets the user decide whether a text with embedded control sequences saved in ANSI format (section 2.6.3) is allowed to contain SGR control sequence codes greater than 4. Such control sequences (e.g. SGR24 = "end of underlined text") are not interpreted correctly by some programs, such as some versions of the Console Device. This could be a problem if Personal Write is used to prepare texts to be displayed with a CLI or Shell command like "Type". If the parameter is set to NO, Personal Write automatically converts SGR codes > 4 into the equivalent groups of 0 to 4 SGR codes. 6.3.6 Use Pad Bytes in Clipboard IFF This parameter defines the format used by Personal Write to write data into the Amiga public clipboard, so that it can be read by different programs. Some programs use the Clipboard without handling IFF FORMs correctly. Among these programs there are some versions of the Amiga Notepad and early versions of the official Commodore clipboard support functions. The programs do not use a special code (a pad byte after odd length IFF chunks) at the end of the text stored in the clipboard. These programs do not pad odd-length chunks in output and do not expect them to be padded in input. Personal Write can read the data written in the wrong format, but if one of the defective programs reads a standard clipboard file, it can lock all programs using the clipboard. If these programs read a correct IFF odd-length chunk with a pad byte they will lock the clipboard, since they will stop reading the data on the pad byte rather than terminate the operation by triggering the read-EOF. Any program which then tries to write to the Clipboard will be locked as well. This explanation may be very detailed, but is of little help to the user whose software has been locked by a clipboard access. Personal Write warns the user that an ill-written application is using the clipboard, but this can be done only after Personal Write has detected a text in the wrong format written by the program, and if the clipboard has not already been locked. FORMs must always be aligned on word boundaries using pad bytes, according to the IFF standard. This parameter can be set to NO if text is to be exchanged through the clipboard with a program which does not use pad bytes. In this way, most programs which do not follow the IFF standard correctly, will be able to access the clipboard without locking it. Personal Write never locks the clipboard, with either setting of the parameter. If the parameter is set to YES, Personal Write will display warning messages whenever data in the wrong format is read. 6.3.7 Backup previous saved As explained in section 2.6, Personal Write can automatically move the previous version of a document being saved into the "t" (from "Temporary") directory of the volume containing the document. While this option can save a lot of work and frustration if the wrong text is overwritten by a save operation, in some very particular cases it may be undesirable to have anything written in the "t" directory. If this option is set to NO, Personal Write does not write into the "t" directory, nor does it create that directory if it does not exist already. 6.3.8 Correct errors in ASCII/ANSI files The same error correction functions described in section 7.3, which can normally be selected to correct a text while it is being typed, can also correct texts loaded from a file. The text to be corrected must be stored in the ASCII or ANSI formats (not compressed, encrypted, IFF nor any other format), using the character set specified by the user (section 6.2). Only the error correction functions are active, while all other functions which normally issue warning messages (without modifying the text) are not executed. Single error handling procedures can be activated or not, as explained in section 7.3. The key can be held down while the text is loaded to suppress any changes to the text, just as when the text is typed. After the text has been successfully loaded, a requester containing a detailed list of any changes which have been made is displayed. 6.3.9 Save ANSI using PP codes When this option is selected and a text is saved in the ANSI format (section 2.6.3), Personal Write uses control codes compatible with the Professional Page desktop publishing program rather than ANSI codes. This is extremely useful for preserving any style information when a text written with Personal Write is loaded by Professional Page for further processing. This option must not be selected if the displayed text already contains any Professional Page codes. 6.3.10 Save printer settings with document Document and paragraph formatting information is always stored with the text when the compressed, IFF-FTXT or encrypted format is selected for the save operation (section 2.6). The printer parameters, however, are saved only if this option is set to YES. If the "PostScript activated" option is selected (section 5.4.1), the PostScript parameters are also stored with the text. If this option is set when a document is stored in the compressed, IFF-FTXT or encrypted format, Personal Write can print the text in exactly the same way as when the text was originally created. It is not necessary to change the printer settings manually. This is very convenient if a different print pitch, quality or line spacing must be used for different types of texts. When a document containing this additional information is loaded, the settings stored with the document become the current values for the entire program. The settings stored with the document are loaded even if the option described here is set to NO when the document is loaded. If the same document is saved again, the printer settings are also saved, regardless of the status of the program parameter. If it is necessary to remove the printer settings by saving the document again, the "Defaults" requester should be displayed to verify whether this option is disabled. The same document can be loaded correctly by a version of Personal Write previous to 3.0, but the printer data will not be loaded, as this function is a new feature of version 3.0. This backward and forward compatibility, however, ensures that data can be exchanged between all versions of Personal Write. By default, printer settings are now always saved as part of the document layout information. 6.3.11 Overwrite existing icons This option controls the actions of Personal Write when a document is stored by replacing a previous document with the same name and a Workbench icon. If the parameter is set to YES, Personal Write associates its default icon image with the document. The new icon will appear in the same position as the previous icon. If a document is saved with the "Icon" option of the file requester set to NO, the existing icon is deleted. If this parameter is set to NO, any existing icons are always left unchanged. 6.4 Mail Merge These parameters specify how Personal Write must replace the alphanumeric labels in the text when a document is printed. Sections 1.13.6 and 2.9 contain additional information on labels. Personal Write can handle more than 30,000 different labels appearing in a single document. The text which replaces a label cannot exceed 80 characters in length. The content of a database file is often better printed with Personal Write than with the data management program. The texts which replace alphanumeric labes are formatted like all other texts. Several parameters let the user select the type of printing better than any database program can do. Labels can very easily be mixed with constant texts. An undesired side effect often appears when data management programs are used to print self-adhesive labels. If a line to be printed begins, for example, with the alphanumeric labels "TITLE NAME", the line will begin with a disturbing space character if the TITLE field of a record is empty, i.e. if no title has to be printed. Personal Write automatically removes such an initial space, if it is caused by an empty field. The default data for the "DATE" (and "DATUM", "FECHA", "DATA") label is automatically filled in by Personal Write, as described in section 5.10. The label "NUM" also has a special meaning. If a number is associated with the label, its value is automatically increased by one each time the "NUM" label is used. Furthermore, if the parameters of Personal Write are saved (section 5.14), the current value of "NUM" is also saved. This is used, for example, to maintain coherent numbering for invoices or other documents. Printer control sequences can be associated with alphanumeric labels. The printer control sequences which can be used are those in the standard Amiga format, beginning with the ESC (Escape, decimal ASCII 27) code. In this way, it is possible to write the text in different colours (on colour printers), or with different printer fonts. Personal Write automatically fills in the default data of some labels reserved for standard printer control codes. The labels translated by Personal Write (and also recognized by the PostScript printer driver) are: from "SGR10" to "SGR19": set font from "SGR30" to "SGR39": set text colour from "SGR40" to "SGR49": set background colour "SHP0": normal pitch "SHP1": elite off "SHP2": elite on (12 cpi pitch) "SHP3": condensed off "SHP4": condensed fine on "SHP5": enlarged off "SHP6": enlarged on "SUS0": normalize the line "SUS1": superscript off "SUS2": superscript on "SUS3": subscript off "SUS4": subscript on It should be noted that the control codes which Personal Write can automatically associate with the labels described here are in the format required by the Amiga printer driver. Amiga printer driver codes are in most cases different from their equivalent printer control codes. Normally, the printer driver translates the Amiga code into the correct code for the printer being used. With Personal Write there are two methods of outputting codes in the printer's format rather than the Amiga format. The first is the "Printer Control File", described in section 2.10 (and the almost equivalent "Print File", described in section 4.3.5), while the second method is to type the code in the string gadget of the requester used to manually define the labels. A printer code typed in the string gadget must be preceded by a special Amiga control sequence (to be sent to the driver), which means "Send the following n characters directly to the printer, without conversions", where 'n' indicates the number of characters in the control sequence in the printer's format. The sequence is ''ESC[n"r'', followed by the data in the printer's format, where 'n' is written as a decimal number (one or more ASCII numerical characters). ESC can be typed by pressing the key. The outer quotes which appear here to enclose the control sequence must not be written, but the double quote (one character) before the lower case 'r' is part of the control string. 6.4.1 Manual and Automatic Translation If the manual translation is active, Personal Write displays one or more requesters before each copy is printed. A series of string gadgets, introduced by the name of the label they refer to, is displayed in the requester. There are as many string gadgets as there are labels to be replaced. If the string gadgets do not fit in one requester, more than one requester will be displayed. The text which will appear instead of the label must be written in the string gadget. The ABORT gadget can be used to abort the print (or print to file) operation. If the automatic translation is activated, the labels are replaced with the data in the specified file. The format of the data is described in the following sections. If both the manual and the automatic translation are activated, the data from the file is read and displayed in the requester described above, where it can be edited. If no translation is activated, the labels will not be translated, but will have their name printed in the same colour as the remaining text. Sometimes it is not very clear whether it would be more convenient to input the data in the requester manually, or use the automatic translation (labels stored in a file), which may also be combined with the requester to edit the data further. If the same data needs to be used frequently, or changed only in part before reuse, it is better to edited and store it in a file (perhaps only temporarily stored in RAM). Personal Write was designed to help reduce repetitive work, and should also be used for this purpose when mail merge data is handled. If only the manual translation is set, but after some experimenting it turns out that the same data has to be typed in again and again in the requester, the automatic translation should immediately be activated. It is often better to work with the document displayed in the main window, and the content of the data file selected for automatic translation displayed in a second window. In this way, changes can quickly be made to the data if necessary. 6.4.2 Field and Record Delimiters This section describes the format of the data which must be stored in a file to automatically replace the labels. The data must be divided into records and fields. The data must begin with a header record. The data contained in the file is divided into records. Each record (except the header record) contains the information necessary to replace all the labels of the text to be printed (each label once). Each record is divided into fields. One field contains the text which has to replace one label. The record of a file of client addresses can, for example, contain a field for each client's name, address, city etc. The first record in the file is the header record. The fields of the header record do not contain data which has to replace labels. Instead, each field contains the name of the label which Personal Write has to replace with the field in that position of the record, for all the following records. Personal Write does not distinguish between upper and lower case letters used to write the labels or the fields of the header record. The fields can be written in any order within the record, provided that the fields in all other records are grouped in the same order. Personal Write must be able to recognize where fields and records begin and end. For this purpose, some characters must be reserved as end of field and end of record codes. The end of field character is written in order to separate fields, while the end of record character is put at the end of every record. The field delimiter must not be written at the end of the last field in the record (before the record delimiter). The record delimiter must be used at the end of the last record, as for every other record. The two delimiter characters must be chosen so that the text contained in the field does not contain characters that are the same as any of the two reserved characters (unless these are enclosed in a delimited character string). As a default, Personal Write uses the ':' (colon, ASCII decimal code 58) character to separate fields. The LF code (Line Feed, ASCII code 10), displayed as a paragraph sign, is used at the end of records. The use of these two characters is widely accepted as standard. The two characters can, however, be modified by writing the new decimal ASCII codes in the string gadgets. Appendix B contains a table of some of the ASCII codes which can be used. Some database programs use a combination of CR+LF characters (Carriage Return and Line Feed, respectively ASCII code 13 and 10). If the field and/or record delimiter are set to 10 or 13, Personal Write automatically skips the other code (13 or 10) if it appears in a CR+LF couple. A well known Amiga database program uses the LF character (Line Feed, ASCII code 10) to separate fields, and the '}' sign (right brace, ASCII code 125) at the end of each record. Some programs used in the IBM environment use the ',' (comma, ASCII code 44) and CR (Carriage Return, ASCII code 13) characters. These codes can be modified in the database program, or they can be modified in Personal Write. It is important that wherever they are modified, they are set to exactly the same codes used by the other program. If the "Export" function of the database program is used, a file is generated which has almost exactly the same format needed by Personal Write (the header record must usually be added at the top of the file). The header record informs the program about which labels in the text can be replaced with which fields in the records of the file. Records may contain information which is not needed by Personal Write, i.e. fields which contain data not needed by any label in the document. Sometimes the records may not contain all the fields necessary to replace all labels. In this case Personal Write displays a requester where the missing fields can be added manually. Personal Write examines the header file and automatically gets ready to analyze a file which may contain too much, or not enough, information. The file from which the data is extracted must not necessarily be written by a data management program. Personal Write itself can be very useful for storing an archive in the above described format. In both cases, it is always very useful to have one window of Personal Write containing the document to be printed, and another displaying the content of the data file. In this way, the data can be previewed, and small changes can be made before the data is stored to a temporary file and used for the mail merge operation. If the data text is edited manually, care should be taken to prevent the error correction functions of Personal Write from inserting undesired spaces after semicolons (or other puntuation signs) separating the fields and/or records. The "Insert Missing Spaces" function can be temporarily disabled (section 7.3.4). The creation and printing of a document containing alphanumeric labels is a simple task. This example will show how 12 different copies of a letter containing the NAME and ADDRESS fields can be printed. The NAME and ADDRESS labels are to be replaced with the content of the file "Clients". The number of copies in the printer settings (section 5.3.8) should be set to 12, or higher. The automatic translation of the labels (section 6.4.1) must be enabled. The file "Clients", containing the data which has to replace the labels must be selected as defined in section 2.9. The format of the data in the "Clients" file must be like the following: NAME:ADDRESS John Smith:25, Green Road "Tom Brown":14, Blue Street ;comment Michael Jones:"Test; : Road" etc. The meaning of the comment text and the quoted strings is explained in the next sections. The file can, of course, contain more than 12 records, and also more than two fields per record. It is very important that the character which separates the fields and the end of record character are those whose code is specified in the requester. The two special characters cannot appear in the field data. In this example the colon must be placed between the name and the address. Neither the name, nor the address can contain the ':' (colon) character (nor the LF code). This is very unlikely, in this example. If a space (' ') had been selected to separate the fields, Personal Write would have considered the family name part of the address. It is possible, but discouraged, to use the same code to separate fields and to terminate records. In this case every record must contain one and only one field for every different label in the text. A field is empty if it does not contain any text. The associated label is replaced with an empty string (no characters). The "Cloanto Extras" drawer of the Personal Write disk contains a sample document using labels, and a data file with records in the correct format to replace the labels. 6.4.3 Character String Delimiter Some database programs can delimit text strings with two special characters when string fields are exported. Any character, including the field, record and comment delimiters and the end of file character may appear between character string delimiters. The use of the character string delimiter is optional. If, however, a field begins with the character string delimiter, it must also terminate with the same character. Personal Write removes the character string delimiters before using the string in a label. The default string delimiter is the quote character ('"', ASCII decimal code 34). 6.4.4 Comment Delimiters It may be useful to associate comment texts with some records, but these should not, of course, be read and printed as fields. User information which is not to be processed as data fields can be inserted in the file. Two characters can be defined, in addition to the characters used between fields and strings and to mark the ends of records. These characters can delimit comment texts written in the records. A comment must be preceded by the "beginning of comment" character, and followed by the "end of comment" character. A comment may contain field, record and string delimiters and the end of file character, which are not considered by Personal Write, unless they are also end of comment characters. A comment must not necessarily begin at the beginning of a line; it can also be inserted in the middle of a record, if the option described below is selected. The standard settings for the two characters are ';' (semicolon, ASCII code 59) to mark the beginning of comments, and LF (ASCII code 10) to terminate comments. By default, the "beginning of record" character is treated as normal data if it appears in the middle of a field. Comments are usually placed between records, rather than in data fields, which could even contain characters equal to the "beginning of comment" character. If the "Fields may contain comments" option is selected, Personal Write is more rigid when "beginning of comment" characters are found (even in the middle of a data field), and always handles these as a comment introducer. 6.4.5 End of File Character Some database programs terminate the data file with a special code, called the end of file character. The use of this character is optional. When this code first occurs outside a character string or a comment, this means that no more data must be read from the file. The default character used for this purpose is the ASCII SUB code (decimal 26, hexadecimal 1A). 6.5 Default Directory The "default directory" indicates the drawer or volume in which the Personal Write program, the user interface text files and the PostScript module are stored. Section 1.15 explains how Personal Write can be automatically loaded when a document icon is selected with the mouse on the Workbench screen. This is only possible if the Amiga operating system can find enough information in the selected icon to locate Personal Write (sections 1.7 and 1.15). If the default directory is defined correctly, this information can be inserted in the icon data when Personal Write stores a document with an associated icon. The default directory is described as a complete Amiga path (section 1.7). The initial default path of Personal Write ("PWrite:") does not need to be modified if the program is loaded from the original disk containing Personal Write. If the program is moved to another device (e.g. a hard disk) or into a different drawer, the path must be updated accordingly, or the "PWrite" logical name must be redefined in the startup-sequence (section 1.16). The new path must be written in the string gadget contained in the requester displayed by this function. The new path is automatically saved with all the other program parameters when the parameters are saved (section 5.14). The maximum length of the path which can be written is 40 characters. The "Information" (or "Info", on some systems) command of the Amiga Workbench can be used to view (and change, if necessary) the default tool path information which is stored by Personal Write in Workbench icons. 6.6 File Requester The file requesters, used by the functions described in sections 2.4 to 2.11, can be personalized by setting the parameters contained in this requester. 6.6.1 Sort Order The files displayed in the file gadget box can be sorted from top to bottom (NORMAL gadget) or vice versa (REVERSE gadget). The first kind is usually preferred if the files are to be sorted by their name, while the reverse sort is useful if the file names are sorted by date, so that the most recently used files appear at the top of the list. 6.6.2 Sort by Date or Name Personal Write can sort files by name (lexicographic order), or by the date in which the file was last modified. The system date and time must always be updated (section 5.9) for this last option to work properly. 6.6.3 Show Comments If this parameter is set to YES, Personal Write displays the length of the file and a comment associated with the file, whenever the name of the file is selected with the mouse in the file gadget box. A comment can be assigned to a file when a document is stored. Sections 2.4 and 2.6 describe the use of comments in more detail.