The Blade ADE AutoLISP Developers Environment Ver. 1.0 (March 1991) R E F E R E N C E M A N U A L BLADE TECHNOLOGIES, Inc. 6101 Balconies Dr. Suite 300 Austin. TX 78731 (512) 451-5156 Copyright (c) 1991 All Rights Reserved PROGRAM LICENSE AGREEMENT CAREFULLY READ THE FOLLOWING TERMS AND CONDITIONS BEFORE OPENING THIS DISKETTE PACKAGE. OPENING THIS DISKETTE PACKAGE INDICATED YOUR ACCEPTANCE OF THE FOLLOWING TERMS AND CONDITIONS. License A. the program may be used on a single machine. B. The Program may be copied into any machine readable or printed form for backup or modification purposes only in support if your use of the program on a single machine. C. You may transfer the program and license to another party if the other party agrees to accept the terms and conditions of the Agreement. If you transfer the program you must either transfer all copies, whether in printed of machine readable form to the same party, or, destroy any copies not transferred. This includes all modifications and/or portions of the program contained or merged into other programs. YOU MAY NOT USE, COPY, MODIFY, OR TRANSFER THE PROGRAM, OR ANY COPY, MODIFICATION OR MERGED PORTION OF THE PROGRAM, IN WHOLE OR IN PART, EXCEPT AS EXPRESSLY PROVIDED FOR IN THIS LICENSE. IF YOU TRANSFER POSSESSION OF ANY COPY , MODIFICATION OR MERGED PORTION OF THE PROGRAM TO ANOTHER PARTY, YOUR LICENSE IS AUTOMATICALLY TERMINATED. Limitation of Remedies Blade Technologies, Inc.'s entire liability, and your exclusive remedy shall be: A. The replacement of any defective diskette(s), which are returned to Blade Technologies, Inc. with a copy of your receipt. IN NO EVENT WILL BLADE TECHNOLOGIES, INC. BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OF CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR THE INABILITY TO USE SUCH PROGRAM EVEN IF BLADE TECHNOLOGIES, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. DISCLAIMER Use of this program acknowledges this disclaimer of warranty: "This program is supplied as is. Blade Technologies, Inc. disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness of this program for any purpose. Blade Technologies, Inc. assumes no liability for damages direct or consequential, which may result from the use of this program." TRADEMARK AutoLISP is a registered trademark of AutoDesk, Inc. MS-DOS is a registered trademark of Microsoft Corporation. PC-DOS is a registered trademark of IBM Corporation. Wordstar is a registered trademark of MicroPro International Corporation. Introduction The ADE is a full-screen text editor designed specifically for creating and debugging AutoLISP code. The ADE has unique features ,such as the hide modes and text code color, which assist in the writing of AutoLISP code. This manual describes the operations of The ADE editor. The ADE was developed with these goals in mind: SPEED - The ADE was designed to operate quickly, especially in displaying and coloring the screen and moving through the file. EASE OF USE - The ADE is very easy to use. If you are familiar with any other text editor The ADE will only take a few minuets to learn. The ADE also uses WordStar-like key commands when possible. You install the program by copying it to disk. Features These are just some of The ADE's many features. Speed - The display techniques used by The ADE are the fastest possible. Code color - Color is used to denote the level of parenthesis to aid in debugging unmatched parenthesis. Find and Highlight Text - The ADE has the ability to find an highlight one or more strings of characters. This is useful when trying to locate certain variables or functions and trace where they are used within the code. Hide modes - The ADE can hide (display as blank) certain sections of code. Function keys are pressed to hide all comments or hide lines containing a balanced number of parenthesis. Edit Large Files - With The ADE you can edit files as larger than 64K. Compact Size - The ADE requires less than 50k of disk space to run. System Requirements The ADE will run on any IBM PC or compatible computer. The MINIMUM requirements are: - 128 KB of free memory (although The ADE can utilize up to 640 KB if it is available). - MS-DOS or PC-DOS 3.1 or greater. - One diskette drive. - Either a color or a monochrome monitor with 80-column display. (of coarse the code color will not function on a monochrome monitor) - 50 KB of disk space. Memory Usage The ADE will utilize up to 640 KB of memory to edit a file. The ADE uses approximately 80 KB of memory. In addition to the 80 KB, you must have twice as much memory as the size of the file you wish to edit. This is because of the color. So, a file 100 KB is size would require 200 KB of free memory in addition to the memory required to run the ADE.Note: The ADE will not be able to use any of the 640 KB of memory being used by any other program. Table of Contents Introduction 4 Features 4 System Requirements 5 Memory Usage 5 Table of Contents 6 Installation 6 Chapter 1. Users Guide For The ADE 6 Quick Start 6 Running The ADE Program 6 In the Editor 7 Saving a file 7 Exiting the editor 7 The Status Lines 7 Files 8 Creating New Files 8 Loading Existing Files 9 Saving Files 9 Exiting 9 Moving Around in the Text 9 Re-Coloring the Text 10 Deleting Text 11 Find and Replace Text 11 Modes 12 Insert mode 12 Display Line Numbers mode 12 Monochrome mode 12 Hide Modes 12 Hide Comments mode 13 Hide Matching Parenthesis Lines mode 13 Compress Text mode 13 Editing mode 14 Chapter 2. The ADE Command Reference 15 Appendix A. List of Commands 20 Appendix B. Error Messages 22 Installation The only file necessary for proper operation of The ADE is: ADE.EXE. You should make a backup of The ADE before you install it. Once you have made your backup copy, simply copy ADE.EXE to the disk and/or subdirectory where you would like to use it. Chapter 1. Users Guide For The ADE Quick Start If you are familiar with text editors The ADE will be very easy to learn. Appendix A is a list of command assignment keys. Most of these keys are the same as Wordstar's. If you want to get started using The ADE quickly you may want to read these sections: "Running The ADE Program", "Modes" and "Appendix A". Running The ADE Program To initiate The ADE, type: ADE Since no file name was specified on the DOS command line the editor will assume that you are editing a new file and the temporary name will be displayed as noname.lsp in the upper right corner of the screen. When you attempt to save the file you will be prompted for the file name, which must be a name other than noname.lsp. You may optionally include the filename on the DOS command line. If the file exits on the disk you will be editing that file. If the file does not exist on the disk the editor will create the new file. For example: ADE filename will edit the file called filename if it exist or created a new file called filename. In the Editor Once you are in The ADE, the cursor movement keys allow you to move around in the text. Saving a file If you have made any changed to the file in the editor a * will appear in front of the file name. To save the changes to the file enter . The ADE maintains a backup of the file with the .BAK extension. Exiting the editor To exit The ADE enter . If you have made changes to the file in the editor and try to exit without saving those changes The ADE will ask if you want to save the file before exiting. The Status Lines At the top and bottom of the editing screen are Status Lines. These Status Lines displays information regarding the file you are currently editing and the type of modes currently active. The Top Status Line is shown below with a description of the information displayed. ------------------------------------------------------------------------- 3 : 30 Insert *c:\acad\lisp\main.lsp ------------------------------------------------------------------------- A B C D E A - The current row position of the cursor. B - The current column position of the cursor. C - Indicates weather Insert mode is on or not. D - The * indicates the file has been modified during the current editing session. The Bottom Status Line is shown below with a description of the information displayed. --------------------------------------------------------------------------- Editing: Full Hidden: MAT COM COMPRESS --------------------------------------------------------------------------- A B C D A - FULL or LINE editing mode. B - Hide Matched Parenthesis Mode - lines with a balanced number of open and closed parenthesis are not displayed. C - Hide Comments Mode - comments are not displayed. D - Compressed Mode - The file is displayed without blank or hidden lines. Files Creating New Files There are two different ways to create new files, ready for editing. 1. From the DOS command line, enter followed by a new filename. For example ADE filename will create "filename" in the current directory. 2. From the DOS command line, type ADE . The ADE will start editing a file called noname.lsp. When you attempt to save the file you will be required to supply a file name other than noname.lsp. Loading Existing Files There are two ways to edit an existing files. 1. From the DOS command line, enter followed by the filename. For example, ADE filename will edit the file "filename" if it exists on disk. 2. While in the editor press . Then you will be prompted for the name of the file to edit. Saving Files To save the current file being edit press . This saves the file and creates a backup of the file with a .BAK extension. Exiting To exit The ADE press . If the current file being edited has not been saved, you will be asked if you wish to save the file of exit without saving the modified file. Moving Around in the Text Cursor Movement The ADE provides several commands which enable you to move about in a file. - Beginning of File Positions the cursor at column one on the first line of the file. - End of File Positions the cursor after the last non- blank character on the last line of the file. - Page Up Page Down Page Up scrolls the text toward the top of the file one page-full at a time. - Page Down Page Down scrolls the text toward the end of the file one page-full at a time. - Find and Repeat Find These commands will search for a specific string of characters in the file. Upon entering the Find command, The ADE will prompt for the string of characters for which to search. Search for: Enter the desired string of characters and press . Moving By Lines and Characters These commands enable you to move in short increments through the text. Cursor Left and Cursor Right These commands move the cursor one column to the right or left on the cursor line. When you use CursorLeft, the cursor will stop when it reaches the left edge of the screen. Cursor Up and Cursor Down These commands move the cursor up or down in the file one line at a time. Insert a Line This command inserts a blank line in the text above the cursor line. Go To Line Go to Line This command displays the code with the specified line number as the first line of the screen. Re-Coloring the Text In order to save time, The ADE does not re-color the entire file every time you make a change to the code. You must press to update the colors showing the latest changes made to the code. Deleting Text Delete to End of Line This command deletes the character at the cursor position and all text to the right of the cursor on the current cursor line. The cursor position does not change. Delete Line This command deletes the current cursor line from the text. All text below the deleted line is shifted up one line. Find and Replace Text Find Find searches for a specified string of characters within the current file. Find and Replace The ADE has the ability to search for a specific string of characters and then replace them with another string of characters. This command functions similar to the find command with the except this command replaces the strings of characters with the new ones. Repeat Last Find This command will reissue the previous Find, Find/Replace or Find/Highlight command using the same character strings. Find and Highlight This command will search for a specific string of characters and highlight every occurrence of that string within the file. The string will remain highlighted until the recolor key is pressed. Since the strings remain highlighted until the recolor key is press it is possible to have more than one string highlighted at a time. Modes The ADE uses modes to assist in the development of AutoLISP code. Modes affect the way the editor functions or displays lines of code. The following describes the different modes of The ADE. Insert mode Insert mode can be switched ON and OFF by pressing the key. When Insert mode is ON, "Insert" will appear on the Top Status Line. Display Line Numbers mode Display Line Numbers mode can be switched ON and OFF by pressing . When this mode is OFF, the line numbers to the left of the screen are not displayed. the default for this mode is ON. Monochrome mode Monochrome mode allows you to toggle color to monochrome only ON and OFF. This enables you to edit the code in a single color. To switch this mode ON and OFF press . Hide Modes In The ADE there are hide modes to assist you in debugging AutoLISP code. A hide mode caused certain parts of the AutoLISP file to be displayed as blanks. The code does NOT get erased it is merely displayed to the screen as a blank or blanks instead of the character or characters in the file.The ADE has two different hide modes, Hide Comments and Hide Matched Parenthesis Lines. The following describes each hide mode. Hide Comments mode Hide Comments mode can be switched ON and OFF by pressing the key. This mode will cause all comments no not be displayed. Or, the part of a line that is a comment will not be displayed. This mode is useful during debugging when you don't want the screen to display any comments. Comments begin with a semi-colon and continue through the end of the line. When this mode in ON, "COM" will appear on the Bottom Status Line. Hide Matching Parenthesis Lines mode Hide Matching Parenthesis Lines mode can be switched ON and OFF by pressing the key. This mode will cause lines containing the same number of open parenthesis "(" as closed parenthesis ")" to be displayed as blank lines. This is very useful during debugging when you want to see the overall structure of the code and not have the more trivial lines of code displayed on the screen. Also, it allows you to locate lines of code that should have a balanced number of open and closed parenthesis but are inadvertently missing one. When this mode is ON, "MAT" will appear on the Bottom Status Line. Compress Text mode Compress Text mode can be switched ON and OFF by pressing the key. This mode works in conjuction with the two previous Hide modes. While Hide Comments or Hide Matched Parenthesis modes are ON you may have multiple lines on the screen that are displayed as blank lines. If you want the screen to show only lines containing displayed information you can turn Compress Text mode ON. This will cause The ADE to skip over lines that would be normally be displayed as blank. Editing mode There are two types of editing modes LINE and FULL. These modes are switched automatically by The ADE. The editor functions normally in FULL editing mode. In LINE editing mode you can only edit one line at a time and you can not insert lines. The ADE switches to LINE Edit mode when any one of the following three modes are switched ON: 1. Hide Comments 2. Hide Matched Parenthesis Lines 3. Compress Text This is to prevent you from modifying lines that contain 'hidden' information on them. Chapter 2. The ADE Command Reference This chapter contains a description for each of the The ADE commands. Backspace Deletes the character to the left of the cursor. Beginning of File Positions the cursor at column one on the first line of the current file. Beginning of Line Positions the cursor at column one of the current cursor line. Cursor Down Moves the cursor downward in the file to the next line. Cursor Left Moves the cursor one character to the left. Cursor Right Moves the cursor one character to the right. Cursor Up Moves the cursor upward in the file to the previous line. Compress Text mode This mode works in conjuction with the two Hide modes. While Hide Comments or Hide Matched Parenthesis modes are ON you may have multiple lines on the screen that are displayed as blank lines. If you want the screen to show only lines containing displayed information you can turn Compress Text mode ON. This will cause The ADE to skip over lines that would be normally be displayed as blank. Delete Character Deletes the character at the current cursor position. Delete Line Deletes the cursor line. The line following the cursor line becomes the new cursor line. Delete Word Right Deletes the "word" to the right of the cursor. Delete to the End of Line Deletes text on the cursor line, from the cursor position to the end of line. Display Line Numbers mode When this mode is OFF, the line numbers to the left of the screen are not displayed. the default for this mode is ON. End of File Positions the cursor on the last line of the file immediately following the last non-blank character. End of Line Positions the cursor immediately following the last non-blank character on the cursor line. Exit the Program or Conditionally discards the current file. If the file has not been modified, the file is discarded without prompting. If the file has been modified, the editor prompts if you want to save the file. Find Searches for a specified string of characters within the current file. Find and Replace Searches and replaces strings within the current file. Find and Highlight Text This command will search for a specific string of characters and highlight every occurrence of that string within the file. The string will remain highlighted until the recolor key is pressed. Since the strings remain highlighted until the recolor key is press it is possible to have more than one string highlighted at a time. Go To Line # This command displays the code with the specified line number as the first line of the screen. Hide Balanced Parenthesis Lines mode This mode will cause lines containing the same number of open parenthesis "(" as closed parenthesis ")" to be displayed as blank lines. This is very useful during debugging when you want to see the overall structure of the code and not have the more trivial lines of code displayed on the screen. Also, it allows you to locate lines of code that should have a balanced number of open and closed parenthesis but are inadvertently missing one. When this mode is ON, "MAT" will appear on the Bottom Status Line. Hide Comments mode This mode will cause all comments no not be displayed. Or, the part of a line that is a comment will not be displayed. This mode is useful during debugging when you don't want any comments to be displayed. Comments begin with a semi-colon and continue through the end of the line. When this mode in ON, "COM" will appear on the Bottom Status Line. Insert a Line Inserts a blank line above the cursor line and positions the cursor on the newly created line. The cursor column does not change. Insert mode This mode toggles Insert ON and OFF. If ON, the word Insert will appear in the middle of the top status line. Load an Existing File To load an existing file into the editor press . You will then be prompted or the file name. Monochrome mode ON/OFF This mode allows you to toggle color to monochrome only ON and OFF. This enables you to edit the code in a single color. Page Down Scrolls the text toward the end of the file one page-full at a time. Page Up Scrolls the text toward the top of the file one page-full at a time. Re-color the File In order to save time, The ADE does not re-color the entire file every time you make a change to the code. You must press F5 to update the colors showing the latest changes made to the code. Repeat Last Find Repeats the previous Find or Find/Replace command. Save File Saves to disk the file currently being edited and creates a backup file with a .BAK extension. Word Left Positions the cursor at the first character of the previous word. Word Right Positions the cursor at the first character of the following word. Appendix A. List of Commands Cursor Movement Commands Cursor Left Left Arrow Cursor Right Right Arrow Cursor Up Up Arrow Cursor Down Down Arrow Page Up PgUp Page Down PgDn Beginning of File Ctrl PgUp End of File Ctrl PgDn Beginning of Line Home End of Line End Go to Line Ctrl QG Word Left Ctrl A Word Right Ctrl F Insert and Delete Commands Insert mode ON/OFF Ins Insert Line Ctrl N Delete Line Ctrl Y Delete to End of Line Ctrl QY Delete Char Left Backspace Delete Char Del Delete Word Right Ctrl T Find and Replace Commands Find Ctrl F Find and Replace Ctrl QA Repeat Last Find/Replace Ctrl L Find and Highlight Text Ctrl QV Special Purpose Keys Monochrome mode ON/OFF Alt F5 Function Keys F1 - not used F2 - Save File F3 - Load a New File F4 - not used F5 - Re-color F6 - Display Line Numbers F7 - Hide Comments F8 - Hide Balanced Parenthesis Lines F9 - Compress Text F10 - not used Appendix B. Error Messages This Appendix contains a list of The ADE error messages that can be displayed. Unable to open output file: There may not be enough space on the disk so save the file or the file/path name is an invalid name. Not enough memory to load file: There is not enough free memory to load the specified file. See section "Memory Usage" for information on memory and file size. 23