---------------------------- I d e a F o r m v 1 . 3 7 ---------------------------- ------------------------------------------------- Written by Christoph Bartholme, Dietrichstraže 9 D-76227 Karlsruhe Germany EMail: Christoph_Bartholme@ka2.maus.de Developed using ST Pascal Plus (CCD) and Assembler (Devpac) A German version is also available on request, including the old TTP version (V1.26). ------------------------------------------------- IdeaForm is public domain (remember: IdeaList is Shareware!). It may be copied and used by everyone. The condition is to copy the COMPLETE and UNCHANGED contents of the folder IDEAFORM. These are the files: IDEAFORM.PRG : The program file IDEAFORM.RSC : The associated resource file IDEAFORM.TXT : These instructions KEY\BAS.KEY : Key file for Basic source files \C.KEY : Key file for C source files \KBJ.KEY : Key file for Kobold Job files \MOD.KEY : Key file for Modula-2 source files \PAS.KEY : Key file for Pascal source files \S.KEY : Key file for Assembler source files \TEX.KEY : Key file for LaTeX files \IDEAFORM.KEY: Default key file (Pascal). The author excludes liability for any damage that may be caused in any way by using IdeaForm. Purpose ------- IdeaForm is an additional tool for IdeaList which can be launched as a kind of module, but also runs as a 'stand alone' program. IdeaForm makes source code listings easier to read by emphasising comments and keywords with text attributes (bold, light, italic, underlined). These are produced by escape codes inserted into output files written by IdeaForm. The files produced may be printed out from IdeaList, which translates the escape codes into the control codes used by various printers. The program is adapted to the syntax of the programming language via a key file IDEAFORM.KEY. With a corresponding key file 'normal' text files can be processed also, e.g. tables, calendars or just emphasising certain words. Installation ------------ IdeaForm needs a key file that is named after the standard extension of the corresponding programming language (such as BAS.KEY, PAS.KEY, or MOD.KEY for instance), or simply a key file named IDEAFORM.KEY. The key file has to be stored either at the same folder level or in the KEY folder and the resource file IDEAFORM.RSC has to be present. Usage ----- At program start IdeaForm can be passed a text file by IdeaList (see below), or from a command line or multi-tasking system. Alternatively you can start the program by double-clicking on it from the desktop, then select the file you want to work on in the file selector that appears after a click on the 'Text file...' button. IdeaForm now looks for a key file corresponding to the source text: For formatting CRAY_EMU.C, IdeaForm uses C.KEY, for example. If no .KEY file can be matched, IdeaForm uses IDEAFORM.KEY by default. If desired a different key file can be loaded with the 'KEY file...' button. The name of the selected key file will be shown in the window's info line. Of course IdeaForm doesn't overwrite the source file but creates a new one for the formatted output: Either a file SCRAP.TXT in the system clipboard, or, if preferred, a file with the source file's name but the extension 'TXA' (TeXt with Attributes) in the same directory as the source; so reformatting the file D:\SOURCE\CRAY_EMU.C will result in D:\SOURCE\CRAY_EMU.TXA). Formatting commences by clicking on 'Start'. IdeaForm loads the source file and opens the output file. The growing bar shows the progress of formatting. You can abort the work by clicking the window closer-button or the selected 'Start' button. IdeaForm works completely in the background and so does not block other processes. You can work with desk accessories or (under multi- tasking) with other programs in the meanwhile. Warning: The source file has to be a pure ASCII file, NOT a tokenised file (such as *.BAS, *.GFA or *.ASM etc.). The attribute codes inserted in the output file are not control codes that a printer understands directly but printer-independent markings (compatible to those used by 1st Word Plus). Therefore the output file should be printed via IdeaList or Wordplus, and not directly from the desktop or other text processors or printing programs. Calling from IdeaList --------------------- The program can be launched from IdeaList with 'Launch IdeaForm...' or by pressing the corresponding key. IdeaForm will start working automatically and output to the clipboard on the boot drive, then returns to IdeaList. Key file -------- The .KEY file serves to adapt the program to the programming language of the source file. You will find several examples for such files in the KEY folder on the disk. You have to copy or move these to the same folder level as IdeaForm, and it is a good idea to rename the most frequently used file to IDEAFORM.KEY. The examples are by no means comprehensive; the author will be glad to receive any key files you have written or extended. The format of key files is quite simple: - Any comments about entries in the KEY file are preceded by a '+'. - All relevant entries have to begin at the start of the line. - The first entry names the TITLE OF THE FILE and is displayed in IdeaForm's info line. - ATTRIBUTES FOR THE KEYWORDS and THE COMMENTS are switched separately. A '1' switches them on, any other character ('0' is best) switches them off. Several attributes may be combined. If no attributes are defined then none will be written to the output file. In that way one can achieve a uniform way of writing the keywords (perhaps in capitals). - STRING MARKERS cause the text between them not to be formated but to stay as in the source text. Two different markers are declarable, with one following directly after the other (e.g. '" for 'String' and "String"). - IdeaForm differentiates between two different COMMENT PARENTHESES. If the programming language only understands one type of comments, then the second pair of parentheses (brackets/braces) must be defined as spaces. If the comment automatically finishes at the end of a line (Basic or Assembler...) then 'EOL' (End Of Line) should be assigned to the end of the comment. - A maximum of 255 KEYWORDS may be defined; fewer are also permitted, any above 255 will be ignored. The order is immaterial. If any word is more than 40 characters long, the rest will be ignored. Characters from 'a' and 'z' or 'A' and 'Z' are allowed inside a keyword, as well as the digits '0' to '9' (but not in the first position) and underscores '_'. It does not matter whether words in the source text are in capitals or in lower case; they will be output in the form defined in the key file. Changes ------- V1.34 .. V1.37: Small internal changes V1.33: Bugfix: Problems with greyed out buttons and the info line. V1.32: Bugfix: Parameter passing when starting from IdeaList. V1.31: Bugfix: Operation in background under MagiC and MultiTOS. V1.30: GEM operation (previously .TTP). V1.26: If no attributes defined, no escape sequences will be written. V1.25: Automatic search for keyword file matching the programming language. V1.24: Two different string markings (previously only one). V1.23: Maximum of 255 keywords (previously 50). V1.22: Bugfixes: Access path, commentary parentheses. V1.10: First distributed .TTP version. ---------------------------------------------------------------------------