copyright BMHELP database created by Greg and Carolyn Belfor Standard Version Copyright 1990 The Software Zone ° abort abort () Usage: Immediate exit to DOS. No buffer saving! Parameters: none Returns: nothing SEE ALSO: <1>exit ° above above (int1, int2) Usage: Unsigned greater than test on int1 and int2. Returns TRUE (non-0) if int1 is is greater than int2. Parameters: Int1 and int2 ®ints¯. Returns: Non-0 for success, 0 for failure. SEE ALSO: <1>above_eq <2>below <3>below_eq ° above_eq above_eq (int1, int2) Usage: Unsigned greater than or equal test on int1 and int2. Returns TRUE (non-0) if int1 is is greater than or equal to int2. Parameters: Int1 and int2 ®ints¯. Returns: Non-0 for success, 0 for failure. SEE ALSO: <1>above <2>below <3>below_eq ° assign_to_key assign_to_key ({key_id}, {function_name}) Usage: Assign a key or key sequence to a function. The key_id can take many forms, outlined under parameters. A key is "unassigned" by assigning the function "nothing" to the key. Parameters: Key_id ®string¯ has some special properties. In general, it is the name of a key surrounded by angle brackets (<>). For a table of key names, select 'key_table' in the SEE ALSO section. It can be preceded by a modifier to specify an attribute such as SHIFT or ALT. The modifier can also specify a particular occurrence of a key that appears more than once on the keyboard (such as "*" and "+"). To get both occurrences of one of these keys, leave out the angle brackets. Note that you need to precede <, >, %, #, ^, and \ with a backslash. There are alternate methods of specifying keycodes...see the manual if you need them. Function_name ®string¯ contains the name of the function to assign. Note that the command may contain arguments (separated by spaces) to the macro as well, such as strings and literal integers. Returns: nothing SEE ALSO: key_table <1>inq_assignment <2>key_to_int <3>int_to_key ° atoi atoi (str, [standard]) Usage: Convert character to ASCII value or convert a string of digits to an integer value. Parameters: Str ®string¯ is to be converted to an integer. Standard ®int¯ is a flag: non-0 or omitted if a string of digits is to be converted, 0 if just the first character should be converted to its ASCII value. Returns: ®int¯ result of the conversion. SEE ALSO: <1>sprintf ° attach_buffer attach_buffer (buf_id) Usage: Attaches a buffer to the current window. DANGER: if the current buffer is not attached to the current window when a screen refresh occurs, who knows what will happen! ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³WARNING: Hazardous to your program if incorrectly used. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Parameters: Buf_id ®int¯ is a buffer id. Valid buffer id's come only from inq_buffer or create_buffer. Returns: nothing SEE ALSO: <1>create_buffer <2>inq_buffer <3>create_window <4>next_buffer <5>next_buffer <6>set_buffer ° autoload autoload (fname, macro1, [macro2 ...]) Usage: Notify BRIEF where to locate macros and globals if they are not already in memory. Parameters: Fname ®string¯ contains the macro file name. The extension ".cm" is assumed if none is given. BRIEF searches the path given by the BPATH environment variable if no path is specified. Macro1, macro2 ... ®strings¯ are the names of the macros/globals. Returns: nothing SEE ALSO: <1>load_macro ° backspace backspace () Usage: In INSERT mode, move the cursor to the previous character and delete the character. In OVERTYPE mode, just move to the previous character. The cursor does not back up over line breaks. Parameters: none Returns: Non-0 for success (cursor moved), 0 for failure. SEE ALSO: <1>left <2>right ° beep beep() Usage: Make a short noise on the speaker. Parameters: none Returns: nothing ° beginning_of_line beginning_of_line () Usage: Move the cursor to the beginning of the current line. Parameters: none Returns: nothing SEE ALSO: <1>move_abs <2>move_rel <3>end_of_line ° below below (int1, int2) Usage: Unsigned less than test on int1 and int2. Returns TRUE (non-0) if int1 is is less than int2. Parameters: Int1 and int2 ®ints¯. Returns: Non-0 for success, 0 for failure. SEE ALSO: <1>above <2>above_eq <3>below_eq ° below_eq below_eq (int1, int2) Usage: Unsigned less than or equal test on int1 and int2. Returns TRUE (non-0) if int1 is is less than or equal to int2. Parameters: Int1 and int2 ®ints¯. Returns: Non-0 for success, 0 for failure. SEE ALSO: <1>above <2>below <3>above_eq ° borders borders ([state]) Usage: Toggles window borders, or turns them on or off. Parameters: State ®int¯ is non-0 for borders on, and 0 for borders off. If omitted, the border state is toggled. Returns: The previous state. SEE ALSO: <1>inq_borders <2>window_color ° call_registered_macro call_registered_macro (type) Usage: Invokes all registered macros of the requested type. Parameters: Type ®int¯ indicates the type of event (see register_macro). Returns: nothing SEE ALSO: <1>register_macro <2>unregister_macro ° cd cd ([dir]) Usage: Change directory (just like DOS "cd"). If no directory name is given, the current directory name is displayed. Parameters: Dir ®string¯ gives the new path. BRIEF accepts both \ and / in a path. Returns: Non-0 for success, 0 for failure SEE ALSO: <1>dos ° change_window change_window ({direction}) Usage: Makes a different window the active window. Note that this works only on tiled windows. Parameters: Direction ®int¯ indicates the direction of the new window: 0=above, 1=right, 2=below, 3=left. If omitted, the user is prompted for an arrow key. Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: <1>set_window <2>next_window ° color color ({bkgnd}, {norm}, {sel}, {mess}, {error}, [marked]) Usage: Sets BRIEF screen colors. Parameters: All arguments are ints. Bkgnd is for background (0-7 only), norm is for normal text, sel is for tiled windows titles, mess is for messages, error is for error messages. Value Color Value Color ----- ----- ----- ----- 0 black 8 dark grey 1 blue 9 bright blue 2 green 10 bright green 3 cyan 11 bright cyan 4 red 12 bright red 5 magenta 13 bright magenta 6 brown 14 yellow 7 white 15 bright white Marked gives both the foreground and background of marked areas: 0x80 for swapping bkgnd and norm, otherwise the high nibble is background and the low is foreground. NOTE: bkgnd values above 7 make the text BLINK! Returns: nothing SEE ALSO: <1>window_color ° compress compress (str) Usage: Compress consecutive whitespace characters to single whitespace characters. Whitespace is defined as space, tab, and newline. All but the first character of each group of whitespace characters is removed. Parameters: Str ®string¯ is the string to be compressed. Returns: The compressed form of the string. SEE ALSO: <1>trim <2>ltrim ° copy copy ([append]) Usage: Copies the marked area to scrap. Optionally appends the new text rather than replacing it. Parameters: Append ®int¯ is non-0 to append to the scrap buffer. If append is 0 or omitted, the marked text replaces the contents of the scrap buffer. Returns: 1 for success, 0 for failure SEE ALSO: <1>cut <2>delete_block <3>inq_scrap <4>paste <5>mark <6>drop_anchor <7>raise_anchor <8>set_scrap_info ° copy_keyboard copy_keyboard (id, [cmd1], [cmd2]...) Usage: Copy of all or part of an existing keyboard into the current keyboard. Parameters: Id ®int¯ is the keyboard id for the keyboard being copied. Cmd1, cmd2, etc. ®strings¯ hold the names of commands whose key assignments should be duplicated in the current keyboard. If no commands are given, then this just creates a duplicate keyboard. Returns: The keyboard id ®int¯ of the new keyboard. 0 is returned (and a keyboard is NOT created) if the commands given are not found. SEE ALSO: <1>keyboard_push <2>keyboard_pop <3>assign_to_key ° create_buffer create_buffer (bname, file_name, [system]) Usage: Creates a new buffer. The new buffer may be attached to a file (new or existing) if desired. Use 'set_buffer' to make this buffer current. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³WARNING: Hazardous to your program if incorrectly used. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Parameters: Bname ®string¯ is the name for the buffer. It may be AT MOST 12 characters. 'edit_file' makes the buffer name the same as the file name, but you can use anything you wish. File_name ®string¯ is the file name to attach, or NULL to attach no file at all. System ®int¯ is 1 to make the buffer a system buffer or 0 to make it a non-system buffer. System buffers have special restrictions (see manual). Returns: The buffer id ®int¯. 0 is returned if the buffer could not be created (only if the file name was invalid). SEE ALSO: <1>attach_buffer <2>delete_buffer <3>set_buffer ° create_edge create_edge ({direction}) Usage: Splits the current TILED window in half, creating a new window. Use 'move_edge' to size the new window. The call will fail if there is not enough room for one line of text and the title (14 chars). The new window becomes current, and both the old and new windows will contain the current buffer. Parameters: Direction ®int¯ tells where to create the new window: 0 = above 1 = right 2 = below 3 = left If omitted, the user is prompted for an arrow key to indicate direction. Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: <1>create_window <2>delete_edge <3>inq_window <4>move_edge <5>set_window <6>create_tiled_window ° create_tiled_window create_tiled_window (lx, by, rx, ty, buffer_id) Usage: Builds tiled windows. DANGER: this only works after 'display_windows(0)' and before 'display_windows(1)'. The windows created must fill the screen and leave no blank space. See the manual and 'display_windows' for more detail. This is used by the 'restore' macro to restore the window layout. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³WARNING: Hazardous to your program if incorrectly used. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Parameters: Lx, by, rx, and ty ®ints¯ are then left, bottom, right and top boundaries of the window. This does NOT include the borders! Upper left corner is (0,0), and lower right is determined by the screen size. Use window coordinates for borders ON, even if borders are off when created. Returns: Nothing SEE ALSO: <1>display_windows <2>inq_screen_size <3>set_window ° create_window create_window (lx, by, rx, ty, message) Usage: Builds an OVERLAPPING window. The new window becomes the current. A buffer MUST be attached to the window using 'attach_buffer' before the screen is refreshed (see 'refresh'). BRIEF supports up to three overlapping windows. The underlying window is restored when the window is deleted. Minimum size is 1 line by 14 characters. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³WARNING: Hazardous to your program if incorrectly used. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Parameters: Lx, by, rx, and ty ®ints¯ are left, bottom, right and top edge coordinates. Upper left is (0,0), and lower right is determined by the screen size. Message ®string¯ is the text to put in the bottom edge of the window. It must be smaller than the width-2 (rx-lx-2). Returns: Nothing SEE ALSO: <1>attach_buffer <2>create_edge <3>create_tiled_window <4>delete_window <5>inq_screen_size ° cut cut ([append]) Usage: Cuts the currently marked area to scrap. Optionally appends the cut area to scrap. Parameters: Append ®int¯ is non-0 to append to scrap, 0 or omitted to replace scrap. Returns: 1 for success, 0 for failure (no marked block). SEE ALSO: <1>copy <2>delete_block <3>inq_scrap <4>paste <5>mark <6>drop_anchor <7>raise_anchor <8>set_scrap_info ° date date ([year], [month], [day], [month_string], [weekday_string]) Usage: Get the current date. Parameters: Year, month, and day ®ints¯ will be filled with the year, month, and day of the month. Month_string and weekday_string ®strings¯ receive English names of the month and day. Returns: Nothing SEE ALSO: <1>time ° del del (file_name) Usage: Delete a file (from disk). Parameters: File_name ®string¯ names the file to be deleted. You cannot delete a file that is being edited. Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: <1>delete_buffer ° delete_block delete_block () Usage: Delete the marked block in the current buffer. The mark is removed by this operation. Parameters: None Returns: 1 for success, 0 for failure. SEE ALSO: <1>cut <2>copy <3>delete_char ° delete_buffer delete_buffer (buffer_id) Usage: Delete a buffer. This cannot be undone! The system will crash if the buffer is attached to any windows when deleted. The buffer id becomes invalid after the buffer is deleted. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³WARNING: Hazardous to your program if incorrectly used. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Parameters: Buffer_id ®int¯ is a buffer identifier obtained from 'inq_buffer' or 'create_buffer'. Returns: Nothing SEE ALSO: <1>attach_buffer <2>create_buffer <3>inq_buffer <4>next_buffer <5>set_buffer ° delete_char delete_char ([num_to_delete]) Usage: Delete one or more characters at the cursor. Parameters: Num_to_delete ®int¯ is the number of characters to delete. If omitted, 1 is assumed. Returns: Non-0 for success (char deleted), 0 for failure. SEE ALSO: <1>backspace <2>delete_block <3>delete_line ° delete_edge delete_edge ({direction}) Usage: Deletes an edge of a TILED window (deleting a window), making the current window larger. The edge must border only two windows. Use only when no overlapping windows are on the screen. When a window is deleted, its window id becomes invalid. Parameters: Direction ®int¯ tells which edge to delete: 0 = above 1 = right 2 = below 3 = left If omitted, the user is prompted for an arrow key. Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: <1>create_edge <2>delete_window <3>inq_window <4>move_edge ° delete_line delete_line () Usage: Delete the current line. The column position is preserved. Parameters: None Returns: Non-0 for success (line deleted), 0 for failure. SEE ALSO: <1>delete_block <2>delete_char <3>cut ° delete_macro delete_macro ({file_name}) Usage: Delete a macro file from memory. NOTE: Key assignments to those macros and global variables are NOT deleted. Parameters: File_name ®string¯ contains the name of the macro file to be deleted from memory. If no extension is given, .cm is assumed. BPATH is not checked for the location of the file, so use the full path name. Returns: Nothing SEE ALSO: <1>load_macro <2>autoload ° delete_to_eol delete_to_eol () Usage: Delete characters up to the end of line. Parameters: None Returns: Nothing SEE ALSO: <1>delete_line <2>delete_char ° delete_window delete_window () Usage: Delete the current OVERLAPPING window. 'delete_edge' is used for TILED windows. The underlying window becomes current. Parameters: None Returns: Nothing SEE ALSO: <1>create_window <2>delete_edge ° display_windows display_windows (level) Usage: Used with 'create_tiled_windows' to create tiled windows. See manual for details. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³WARNING: Hazardous to your program if incorrectly used. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Parameters: Level ®int¯ is 0 to create new windows and 1 to display the windows. 'create_tiled_windows' can only be called after calling 'display_windows(0)' and before 'display_windows(1)'. Returns: Nothing SEE ALSO: <1>create_tiled_window ° distance_to_tab distance_to_tab () Usage: Get number of columns to the next tab stop. Parameters: None Returns: The number of columns ®int¯ to the next tab stop. SEE ALSO: <1>tabs ° dos dos([command],[use_dos_shell]) Usage: Executes a DOS command from inside BRIEF or causes a shell to DOS. The command is located by searching the DOS PATH for a .com or .exe file. If the command is not found, then it is passed directly to DOS (since it might be an internal command or .bat file). ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³NOTE: Some programs can clobber BRIEF, especially those ³ ³using pre-DOS 2.0 memory allocation calls. It is always³ ³safest to save all modified buffers before using 'dos'. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Parameters: Command ®string¯ is the command to be executed. If omitted, a DOS shell is created instead, from which the user must type EXIT to return to BRIEF. Parameters may be included in the string, delimited by spaces. Redirection of standard input and output is allowed (including appending), but not pipes. Standard error can be redirected to the same file as standard output by using >& or >>&. If standard error is redirected, BRIEF will not clear the screen before and after the command executes. Use_dos_shell ®int¯ is 0 to skip passing the command to DOS (only look along the path), non-0 or omitted to try the DOS shell too. Returns: DOS error level returned by the command, or the DOS shell error value if executed by the shell. Some of the error codes possible are: 2 File not found 3 Path not found 4 Too many open files 5 Access denied 8 Insufficient memory 15 Invalid drive Other codes can be found in the DOS Tech Reference. SEE ALSO: <1>cd <2>del <3>date <4>exist <5>getwd <6>time ° down down () Usage: Moves the current position down one line. Parameters: None Returns: Non-0 for success (position changed), 0 for failure. SEE ALSO: <1>up <2>left <3>right ° drop_anchor drop_anchor ([type]) Usage: Start marking a block at the cursor position. Marks are kept on a LIFO stack, so multiple marks are allowed. Be sure to raise each mark to avoid gobbling up memory with the stack. Only the most recent mark in the current buffer is displayed as the "marked area". Parameters: Type ®int¯ determines the type of mark: 1 Normal 2 Column 3 Line 4 Noninclusive If omitted, a normal mark (type 1) is used. Returns: Nothing SEE ALSO: <1>copy <2>cut <3>mark <4>paste <5>raise_anchor <6>swap_anchor ° drop_bookmark drop_bookmark ({number}, {overwite}, [buffer_id], [line], [column]) Usage: Drops a bookmark. Up to 10 can be active at once. Parameters: Number ®int¯ is the number (from 0 to 10, 0 is the same as 10) of the bookmark. Overwrite ®string¯ contains "y" to overwrite the previous bookmark, "n" if not. If the rest of the parameters are omitted, the bookmark is dropped at the current position. If given (and all three should be given if any are) the bookmark is dropped in the given buffer at the given line and column. Returns: Greater than 0 for success, 0 for failure and no message was displayed, and less than 0 for failure and a message was displayed. SEE ALSO: <1>goto_bookmark ° edit_file edit_file ({filename}) Usage: Bring a file into the current buffer (and window) for editing. All type 1 and type 6 registered macros and file extension macros are called. If filename is already in another buffer, that buffer becomes current. Parameters: Filename ®string¯ contains the name of the file to edit. Returns: 1 if the buffer already existed, 2 if the buffer was newly created, 0 or less for failure. SEE ALSO: <1>attach_buffer <2>call_registered_macro <3>create_buffer <4>set_buffer ° end_of_buffer end_of_buffer () Usage: Move to the last character in the current buffer. Parameters: None Returns: Non-0 for success (position moved), 0 for failure (at end of buffer). SEE ALSO: <1>end_of_line <2>end_of_window ° end_of_line end_of_line () Usage: Moves to the end of the current line. Parameters: None Returns: Non-0 for success (position moved), 0 for failure (at end of line). SEE ALSO: <1>end_of_buffer <2>end_of_window ° end_of_window end_of_window () Usage: Moves to the last line of the current window, maintaining the column position. Parameters: None Returns: Non-0 for success (position moved), 0 for failure (at the end of window). SEE ALSO: <1>end_of_buffer <2>end_of_line ° error error (control_string, [parameters...]) Usage: Display error message. 'error' can also pause execution by using the 'pause_on_error' function. Other than color and pausing, 'error' is identical to 'message'. This is like C printf, with a max of 10 parameters. Parameters: Control_string ®string¯ is a standard control string (see manual). Parameters ®ints or strings¯ are used as needed by the control string. Returns: Nothing SEE ALSO: <1>message <2>pause_on_error <3>set_msg_level ° execute_macro execute_macro ({command_name}, [parms], ...) Usage: Executes a macro by name. If the macro is not present in memory, BRIEF will try to load it according to the BPATH environment variable. Cannot be replaced by a replacement macro. Parameters: Command_name ®string¯ contains the name of a macro. Parameters (delimited by spaces) can be contained in command_name. Parms ®string or int¯ are additional parameters to pass to the command. Note that integer parameters can be passed to the function either as regular ints or as string literals. Returns: The return value of the command executed. SEE ALSO: <1>load_macro <2>autoload <3>delete_macro ° exist exist (file_name) Usage: Does file_name exist? Parameters: File_name ®string¯ contains the name of a file. Full path names are allowed but not required. Returns: Non-0 if the file exists, 0 if not. SEE ALSO: <1>del <2>read_file <3>edit_file ° exit exit ({confirm}) Usage: Sets up to return from a call to 'process' or to return to DOS (if there is no active call to 'process'). If any buffers are modified, the user is prompted to be sure he wants to quit before saving. The exit takes effect after the current command from the keyboard is completed. Parameters: Confirm ®string¯ is "y" or "Y" if the exit should happen regardless of modified buffers, or "w" or "W" to write all modified buffers before exiting. Confirm is ignored if the exit is from a call to 'process'. Returns: Non-0 if the exit will occur, 0 if not. SEE ALSO: <1>abort <2>process ° file_pattern file_pattern (pattern) Usage: Set up a new pattern for finding matching files in the current directory (see 'find_file'). Parameters: Pattern ®string¯ is the file pattern (such as: "*.h", "a??.m", or "b.exe"). Returns: Nothing SEE ALSO: <1>find_file ° find_file find_file ([name], [size], [data], [time], [attribute]) Usage: Finds the next file matching the pattern set up with 'file_pattern'. This also gets additional information about the matched file. Parameters: 'find_file' fills in all the parameters with information about the matched file. Name ®string¯ is the filename without path or drive, size ®int¯ is the size of the file. Date, time, and attribute ®ints¯ are the other file info kept by DOS. Returns: Non-0 for success (a match was found), 0 for failure (no more matching files). SEE ALSO: <1>file_pattern ° first_time first_time () Usage: Returns TRUE if this is the first invocation of the calling macro since loading. The actual loading resets the first_time flag, so deleting the macro and reloading will look like it was never loaded. Parameters: None Returns: Non-0 for first invocation, 0 if not. SEE ALSO: ° get_parm get_parm ([parm_no], variable, [prompt], [length], [default]) Usage: Get an argument sent to the macro. This can also be used as a general purpose "prompt for value" by calling it with parm_no equal to NULL. Parameters: Parm_no ®int¯ is the parameter number, (0 based). Variable ®int or string¯ will be filled with the value. Prompt ®string¯ is used to prompt user for unspecified parameters. If there is no prompt (or if it is NULL), the user is not prompted. Length ®int¯ is the max length string to get (only for strings, of course, and only if the user is prompted). Default (same type as variable) is the default value to use, and is shown on the command line if the user is prompted. NOTE: Length is only used if the parameter type is string. Therefore, default is fourth for ints, and fifth for strings. Returns: Greater than 0 for success, 0 for failure. SEE ALSO: <1>put_parm ° getwd getwd (disk_letter, result) Usage: Gets the working directory. Parameters: Disk_letter ®string¯ contains drive letter (NULL = current drive). Result ®string¯ is filled in with the requested directory path (including drive letter). Returns: Greater than 0 for success, 0 for failure. SEE ALSO: <1>dos <2>del <3>date <4>exist <5>getwd <6>time ° goto_bookmark goto_bookmark ({number}, [buffer_id], [line], [column]) Usage: Either restores a position saved with 'drop_bookmark', or finds the location of a bookmark. When restoring, if the bookmark was in a different buffer, that buffer becomes current. Parameters: Number ®int¯ is the desired bookmark number (range is 1 to 10, 0 same as 10). If given, buffer_id, line and column ®ints¯ will be set to the buffer id, line and column positions of the bookmark. NOTE: If these three parameters are specified, BRIEF will not move to the bookmark, just fill in the values. Returns: Greater than 0 for success, 0 for failure and no message displayed, and less than 0 for failure and a message was displayed. SEE ALSO: <1>drop_bookmark ° goto_line goto_line ({line_number}) Usage: Move to a given line. The cursor is placed at the beginning of that line. Parameters: Line_number ®int¯ contains the line number. Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: <1>goto_old_line ° goto_old_line goto_old_line (line_number) Usage: This is just like 'goto_line' except that it uses line numbers as they were before any editing. If the target line doesn't exist, it goes to just after the nearest line. Parameters: Line_number ®int¯ contains the line number. Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: <1>goto_line ° index index (string_to_search, pattern) Usage: Locates the first match of pattern in string_to_search. Character positions start with 1. The result is undefined if pattern is a null string. See 'search_string' to search a string using regular expressions. Parameters: String_to_search and pattern ®strings¯. Returns: If pattern is found, the position in string_to_search, 0 if not found. SEE ALSO: <1>rindex <2>search_string ° inq_assignment inq_assignment (convert_str, [convert_to_key]) Usage: Converts back and forth from command names to key assignments. Parameters: To convert from a key sequence to a command name, convert_str ®string¯ contains the key sequence (see key_table), and convert_to_key ®int¯ is 0 or omitted. To convert from a command name to a key sequence, convert_str contains the command name, and convert_to_key is non-0. Returns: A string containing the desired conversion. For key sequence to command: the name of the command; OR "nothing" if no command is assigned; OR "ambiguous" if there is more than key sequence starting with the convert_str. For command to key sequence: a list of the valid key sequences for the command. The list elements are formatted with the following separators: <-or> Separates different ways of specifying a single key. <-and> Separates keys in a multi-key sequence. <-also> Separates multiple (different) key sequences. See manual for more detail. SEE ALSO: <1>assign_to_key <2>key_to_int <3>key_to_int key_table ° inq_borders inq_borders () Usage: Get borders setting. Parameters: None Returns: 0 if off, non-0 if on. SEE ALSO: <1>borders ° inq_brief_level inq_brief_level () Usage: Get number of copies of BRIEF in memory. Parameters: None Returns: Number of copies of BRIEF in memory ®int¯. SEE ALSO: ° inq_buffer inq_buffer () Usage: Get current buffer id. Parameters: None Returns: The buffer id ®int¯ of the current buffer. SEE ALSO: <1>attach_buffer <2>create_buffer <3>delete_buffer <4>next_buffer <5>set_buffer ° inq_called inq_called () Usage: Get name of the macro that called the current macro. Parameters: None Returns: Name of calling macro ®string¯. The name is a null string ("") if called from the keyboard, and "Primitive" if called from a BRIEF primitive. SEE ALSO: <1>set_calling_name ° inq_cmd_line inq_cmd_line () Usage: Get the response text currently on the prompt line. Only valid in a type 8 registered macro. Parameters: None Returns: The current prompt response ®string¯. SEE ALSO: <1>inq_message ° inq_command inq_command () Usage: Get name of last command invoked from keyboard. Commands with names beginning with an underscore (_) are ignored. Parameters: None Returns: The name of the command ®string¯. SEE ALSO: ° inq_environment inq_environment (variable) Usage: Get a value from the DOS environment. Parameters: Variable ®string¯ is the name of the variable in the DOS environment, in UPPER CASE only. Blanks are NOT ignored. Returns: The corresponding environment variable ®string¯ or the null string if not found. SEE ALSO: ° inq_idle_default inq_idle_default () Usage: Get the default idle time value, specified by the -i flag on the command line or in BFLAGS. Parameters: None Returns: The default idle time ®int¯. 0 is returned if no default idle time was specified. SEE ALSO: <1>inq_idle_time <2>register_macro ° inq_idle_time inq_idle_time () Usage: Get the number of seconds since the last keypress. This will not work during an invocation of 'process'. Parameters: None Returns: The idle time in seconds ®int¯. SEE ALSO: <1>inq_idle_default <2>register_macro <3>process ° inq_kbd_char inq_kbd_char () Usage: Get the status of the keyboard input buffer. Keys get there from either the user pressing them or the 'push_back' macro. Parameters: None Returns: 0 if buffer empty, non-0 otherwise. SEE ALSO: <1>inq_kbd_flags <2>keyboard_flush <3>read_char ° inq_kbd_flags inq_kbd_flags () Usage: Get the state of the special keyboard flags. Parameters: None Returns: The keyboard flags ®int¯. Each key is assigned to a bit: 0x1 Right Shift 0x2 Left Shift 0x4 Ctrl 0x8 Alt 0x10 Scroll 0x20 Num Lock 0x40 Caps Lock SEE ALSO: <1>inq_kbd_char ° inq_keyboard inq_keyboard () Usage: Get the current keyboard id. Parameters: None Returns: The keyboard id ®int¯. SEE ALSO: <1>keyboard_pop <2>keyboard_push ° inq_line_length inq_line_length () Usage: Get the max line length. Parameters: None Returns: The maximum line length ®int¯. SEE ALSO: ° inq_local_keyboard inq_local_keyboard () Usage: Get local keyboard id for current buffer. This is different than the global keyboard that applies to all buffers. See the manual under Macro Primitives for more info. Parameters: None Returns: The local keyboard id ®int¯. SEE ALSO: <1>use_local_keyboard ° inq_macro inq_macro (function_name) Usage: Find out if there is a macro loaded (or a macro primitive) by a given name. Parameters: Function_name ®string¯ is the name to check. Returns: Non-0 if the name matches, 0 if not. SEE ALSO: <1>inq_assignment ° inq_mark_size inq_mark_size () Usage: Get size, in characters, of the currently marked area. Newline sequence counts as one character. Parameters: None Returns: The size of the marked area in characters ®int¯. SEE ALSO: <1>drop_anchor <2>inq_marked <3>mark ° inq_marked inq_marked ([start_line], [star_col], [end_line], [end_col]) Usage: Get the boundaries and type of a marked area. Parameters: All are ®ints¯. Start_line, start_col, end_line and end_col are set to the boundaries of the marked area. Returns: The mark type or 0 if no marked area exists: 0 No mark 1 Normal mark 2 Column mark 3 Line mark 4 Noninclusive mark SEE ALSO: <1>drop_anchor <2>inq_mark_size <3>mark <4>raise_anchor ° inq_message inq_message () Usage: Get current text displayed on the prompt line. Parameters: None Returns: The text string on the prompt line. SEE ALSO: <1>inq_cmd_line <2>error <3>message ° inq_mode inq_mode () Usage: Get typing mode: insert or overtype. Parameters: None Returns: Non-0 for insert mode, 0 for overtype. SEE ALSO: <1>insert_mode ° inq_modified inq_modified ([buffer_id]) Usage: Get modified status for buffer. Parameters: Buffer_id ®int¯ tells which buffer to check. If omitted, check the current buffer. Returns: Non-0 if modified, 0 if not. SEE ALSO: <1>inq_buffer ° inq_msg_level inq_msg_level () Usage: Get current message level. Parameters: None Returns: The current message level ®int¯. 0 all messages on 1 normal messages off 2 error messages off 3 error and normal messages off SEE ALSO: <1>error <2>message <3>set_msg_level ° inq_names inq_names ([full_name], [extension], [buffer_name]) Usage: Get the file and buffer names for the current buffer. Parameters: Full_name ®string¯ is filled with full path name. The path separator may be either \ or /. Extension ®string¯ is filled with just the extension of the file. Buffer_name ®string¯ is filled with the buffer name. Returns: Nothing SEE ALSO: ° inq_position inq_position ([line], [col]) Usage: Get current position in the buffer. The first character of the buffer is 1,1. Parameters: Line and col ®ints¯ are filled with the current line and column. Returns: 0 if not past end of buffer. The the number of lines past end of buffer otherwise. SEE ALSO: <1>move_abs <2>move_rel ° inq_scrap inq_scrap ([last_newline], [mark_type]) Usage: Get scrap buffer id and mark type. This id is only valid until the next cut or copy...then it becomes invalid. Parameters: Last_newline ®int¯ will be set to non-0 if the last newline in the scrap should be included, 0 if it should be ignored (see set_scrap_info). Mark_type ®int¯ will be set to type of mark 1 normal mark 2 column mark 3 line mark 4 noninclusive mark Returns: The buffer id ®int¯ of scrap. SEE ALSO: <1>copy <2>cut <3>paste <4>set_scrap_info ° inq_screen_size inq_screen_size ([lines], [cols]) Usage: Get screen dimensions. Parameters: Lines and cols ®ints¯ are filled with the current values. Returns: 0 if monochrome, non-0 if a color mode. SEE ALSO: ° inq_system inq_system ([buffer_id]) Usage: Find out if a buffer is a system buffer. Parameters: Buffer_id ®int¯ is the buffer id to check. Omit it to check the current buffer. Returns: Non-0 if system buffer, 0 if not. SEE ALSO: <1>create_buffer ° inq_top_left inq_top_left ([top_line], [top_col], [win_id], [line], [col], [buf_id]) Usage: Get buffer positioning information. Parameters: Top_line and top_col ®ints¯ are filled with position of the top left character in the buffer in the window given by win_id ®int¯. If win_id is omitted, the current window is used. Line and col ®ints¯ give the current buffer (for that window). Buf_id ®int¯ is set to the buffer id attached to the window. Returns: Nothing SEE ALSO: <1>set_top_left ° inq_views inq_views ([buffer_id]) Usage: Get number of windows containing a buffer. Parameters: Buffer_id ®int¯ is buffer id to check. Omit it to check the current buffer. Returns: Number of windows containing the buffer ®int¯. SEE ALSO: ° inq_window inq_window () Usage: Get window id for current window (tiled only). Parameters: None Returns: The window id ®int¯. 0 is returned if the current window is an overlapping window. SEE ALSO: <1>change_window <2>set_window ° inq_window_color inq_window_color () Usage: Get window background color. Used only with borderless windows. Parameters: None Returns: The color number ®int¯ for the current window. SEE ALSO: <1>borders <2>window_color <3>color ° inq_window_info inq_window_info ([window_id], [buffer_id], [lx], [by], [rx], [ty]) Usage: Get buffer id, size and type for a given window id. Parameters: Window_id ®int¯ contains the window id to check. Omit it to check the the current window. Buffer_id ®int¯ is filled with the buffer id of the buffer attached to the window, or 0 if no buffer is attached. Lx, by, rx, and ty ®ints¯ are left x, bottom y, right x, and top y cooordinates of the window. They are given as though borders were on, even if they are off. Returns: 0 for tiled, 1 for overlapping. SEE ALSO: <1>create_tiled_window <2>inq_window_color <3>inq_window <4>inq_window_size ° inq_window_size inq_window_size ([lines], [columns], [shift]) Usage: Get height, width, and horiz scroll amount for the current window. Parameters: Lines and columns ®ints¯ are filled with number of lines and columns in the current window. Shift ®int¯ is the number of characters that the window is scrolled horizontally. Returns: Nothing SEE ALSO: <1>inq_window_info ° insert insert (str) Usage: Insert a string at the cursor position. Characters beyond the max line length are ignored. The cursor is placed just after the inserted string. Overtype mode is ignored and registered macros are not called. Parameters: Str ®string¯ is the string to be inserted. Returns: Nothing SEE ALSO: ° insert_mode insert_mode ([insert]) Usage: Toggle or set the current typing mode: insert or overstrike. Parameters: Insert ®int¯ is 0 to set overstrike mode, and non-0 for insert mode. If omitted, the mode setting is toggled. Returns: The previous mode. SEE ALSO: <1>inq_mode ° int_to_key int_to_key (key_integer) Usage: Convert an integer to mnemonic key string. Parameters: Key_integer ®int¯ is a keystroke value like that returned by 'read_char'. Returns: The mnemonic key string (like ""). This type of string is used by 'assign_to_key'. See key_table for a full description of the format of key strings. SEE ALSO: <1>assign_to_key <2>inq_kbd_char <3>key_to_int <4>read_char key_table ° key_to_int key_to_int (key_string) Usage: Convert mnemonic key string to an integer. Parameters: Key_string ®string¯ contains a single mnemonic key description (like "i" or ""). Returns: The key value ®int¯. SEE ALSO: <1>assign_to_key <2>inq_kbd_char <3>int_to_key <4>read_char key_table ° keyboard_flush keyboard_flush () Usage: Flush the keyboard buffer. Parameters: None Returns: Nothing SEE ALSO: <1>inq_kbd_char <2>process <3>read_char ° keyboard_pop keyboard_pop ([save_map]) Usage: Pop a keyboard off the keyboard stack, making the previous keyboard current. The keyboard id only remains valid if the save_map argument is non-0, otherwise the keyboard is lost and its memory reclaimed. The local keyboard will also be restored if the pop occurs in the same buffer as the corresponding push. See the manual for a complete description of keyboard handling. Parameters: Save_map ®int¯ is non-0 to keep the keyboard, 0 or omitted to discard it. Returns: Nothing SEE ALSO: <1>inq_keyboard <2>inq_local_keyboard <3>keyboard_push <4>use_local_keyboard ° keyboard_push keyboard_push ([new_map]) Usage: Push a keyboard (new or existing) onto the keyboard stack. This is a LIFO stack. If a new keyboard is created, it is empty, and the local keyboard is unassigned. See the manual for a complete description of keyboard handling. Parameters: New_map ®int¯ is the id of the keyboard map to push. Omit new_map or make it 0 to create a new, empty keyboard. Returns: Nothing SEE ALSO: <1>inq_keyboard <2>keyboard_pop <3>inq_local_keyboard <4>keyboard_typeables <5>use_local_keyboard ° keyboard_typeables keyboard_typeables () Usage: Add all of the standard keys to the current keyboard. (ASCII keys, Backspace, Tab, and Enter). Parameters: None Returns: Nothing SEE ALSO: <1>assign_to_key <2>keyboard_push <3>self_insert ° left left () Usage: Moves the current position left one column. Parameters: None Returns: Non-0 for success (position changed), 0 for failure. SEE ALSO: <1>right <2>up <3>down ° load_macro load_macro ({filename}) Usage: Load a macro file. Parameters: Filename ®string¯ contains the name of the macro file to load. If no extension is specified, .cm is assumed. If a path or drive is specified in filename, then the BPATH is not searched. Returns: Greater than 0 for success, 0 for failure. SEE ALSO: <1>autoload <2>delete_macro ° lower lower (input_string) Usage: Converts a string to lower case. Parameters: Input_string ®string¯ will be converted. The string itself is not changed, the lower-cased version is the return value. Returns: A lower-cased version of input_string. SEE ALSO: <1>upper ° ltrim ltrim (input_string) Usage: Get a copy of a string with leading white space removed. Whitespace is defined as space, tab and newline. Parameters: Input_string ®string¯ is to be trimmed. Returns: A trimmed copy of the input_string. SEE ALSO: <1>compress <2>trim ° mark mark ([type]) Usage: Toggle the anchor status. If another type of anchor is already dropped, its type is changed to the new type. Parameters: Type ®int¯ is the mark type. If omitted, a normal mark is used. 1 normal mark 2 column mark 3 line mark 4 noninclusive mark Returns: Nothing SEE ALSO: <1>copy <2>cut <3>drop_anchor <4>paste <5>print <6>raise_anchor <7>swap_anchor <8>write_block ° message message (control_string, [parameters], ...) Usage: Display a formatted string on the prompt line. The form is like a C language printf statement. The maximum number of parameters allowed (in addition to the control_string) is 10. Parameters: Control_string ®string¯ specifies the text and format control. Parameters are optional parameters that the control string may require. (see manual for more info). Returns: Nothing SEE ALSO: <1>error <2>inq_msg_level <3>set_msg_level ° move_abs move_abs ([line], [column]) Usage: Move to an absolute location. Positions start at 1,1. If a parameter is 0 or omitted, that coordinate is unchanged. Parameters: Line ®int¯ and column ®int¯ specify the new location. Returns: Non-0 for success, 0 for failure (no movement). SEE ALSO: <1>move_rel <2>next_char <3>prev_char ° move_edge move_edge ({direction}, {amount}) Usage: Moves an edge between two TILED windows. Parameters: Direction ®int¯ specifies the edge to move: 0 = above 1 = on right 2 = below 3 = on left If omitted, the user is prompted for an arrow key to indicate direction. Amount ®int¯ tells how far to move with respect to the upper left corner. Negative means move toward it. Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: <1>create_edge <2>delete_edge ° move_rel move_rel ([num_lines], [num_columns]) Usage: Move to a new position relative to the current position. Positions start at 1,1. If a parameter is 0 or omitted, that coordinate is unchanged. Parameters: Num_lines ®int¯ is the number of lines to move. Num_columns ®int¯ is the number of columns to move. Returns: Non-0 for success (position moved), 0 for failure. SEE ALSO: <1>move_abs <2>next_char <3>prev_char ° next_buffer next_buffer ([system_too]) Usage: Gets the next buffer id from the (circular) buffer list. This only gets the next buffer number, it does change the current buffer. Parameters: System_too ®int¯ is non-0 to include system buffers, and 0 or omitted to skip over them. Returns: The next buffer id ®int¯ in the buffer list. SEE ALSO: <1>attach_buffer <2>delete_buffer <3>inq_buffer <4>set_buffer ° next_char next_char ([num_chars]) Usage: Move cursor forward one or more characters. This function crosses line boundaries. Tabs act like single characters. Parameters: Num_chars ®int¯ tells how many characters to move. Returns: 0 if failure (no movement), non-0 if success SEE ALSO: <1>move_abs <2>move_rel <3>prev_char ° next_window next_window ([window_id]) Usage: Get window id of next tiled window. This does not change the current window, it just gets the next id. Parameters: Window_id ®int¯ is a the starting window id. If omitted, the window id after the current window is returned. Returns: The next window id ®int¯. SEE ALSO: <1>inq_window <2>set_window ° nothing nothing () Usage: Used to "unassign" a key. It does nothing, but if called from the keyboard, it will call the registered macro for unassigned keys. Parameters: None Returns: Nothing SEE ALSO: <1>assign_to_key <2>self_insert ° output_file output_file ([filename]) Usage: Set the name of the output file for the current buffer. (undocumented in manual). Parameters: Filename ®string¯ gives the new output file name. Returns: none SEE ALSO: <1>edit_file ° page_down page_down () Usage: Scrolls down one window of text (not in manual). Parameters: none Returns: nothing SEE ALSO: <1>page_up ° page_up page_up () Usage: Scrolls up one window of text (not in manual). Parameters: none Returns: nothing SEE ALSO: <1>page_down ° paste paste () Usage: Insert the contents of the scrap buffer at the current cursor location (not in manual). Parameters: none Returns: undocumented in manual....probably 0 if error, non-0 on success SEE ALSO: <1>cut <2>copy <3>inq_scrap <4>set_scrap_info ° pause_on_error pause_on_error ([pause]) Usage: Set pausing execution on every error. This is mainly a debug feature, used in conjunction with the "error" macro and to catch error messages before the vanish from the screen. Parameters: Pause ®int¯ is non-0 to enable pausing and 0 to disable. If omitted, the current pause state is toggled. Returns: The previous state. SEE ALSO: <1>error ° playback playback ([file_name], {overwrite}, [play_now]) Usage: Plays back or loads a keystroke macro. The macro must have been created by using 'remember', and can only be loaded from a file if it was saved using 'save_keystroke_macro'. Parameters: File_name ®string¯ contains the DOS name of the file to load. If no path is given, the BPATH environment is searched. The .km extension is assumed if unspecified. If file_name is omitted, the keystroke macro in memory is played back immediately. Overwrite ®string¯ is "y" if the loaded macro should overwrite the one in memory. The user is prompted if overwrite is omitted. Play_now ®int¯ is needed only when loading a file, and should be non-0 or omitted if the macro should run immediately after loading. Returns: 0 no keystroke macro to playback 1 success -1 sequence paused or being remembered -2 error loading keystroke macro file SEE ALSO: <1>remember <2>save_keystroke_macro ° prev_char prev_char ([number]) Usage: Moves the cursor backward one or more characters. Unlike 'backspace', this function croses line boundaries. Tabs are treated as single characters. Parameters: Number ®int¯ is the number of characters to move. Returns: 0 if failure (no movement), non-0 if success SEE ALSO: <1>move_abs <2>move_rel <3>next_char ° print print () Usage: Sends the contents of the CURRENTLY MARKED AREA to the printer (PRN:). This is a DIRECT write to the printer... print spoolers are bypassed. Tabs are expanded to spaces in the printer output. Parameters: none Returns: 0 for success, -1 for printer busy, less than -1 for other printer errors or no marked block. SEE ALSO: <1>printf ° printf printf (ctl_string, [params],...) Usage: Formatted output to standard output. Generally used for debugging in conjunction with redirection of standard output on the command line. If console output is not redirected, the output overwrites data on the screen but does not affect any editing buffers...it just looks messy. Parameters: Ctl_string ®string¯ is a standard BRIEF control string. Params (integers or strings) are the parameters required by the control string. Only 10 parameters are allowed. Returns: nothing SEE ALSO: <1>sprintf <2>print ° process process () Usage: Recursively invokes BRIEF from within BRIEF. This means that keystrokes are read and appropriate macros are executed until 'exit' is called AND the macro calling 'exit' also terminates. The effect is that a single macro may call 'exit' multiple times which will terminate multiple 'process' calls. See manual for more info. Parameters: none Returns: nothing SEE ALSO: <1>assign_to_key <2>exit <3>keyboard_push <4>keyboard_pop ° push_back push_back (char, [FIFO_or_LIFO]) Usage: Pushes a character into the keyboard input buffer. The input buffer is 10 characters deep. Parameters: Char ®int¯ is the ASCII value of the character to be pushed. You can get the value from 'read_char' or 'key_to_int' (or from an ASCII table). FIFO_or_LIFO ®int¯ is non-0 or omitted to use first-in-first-out order, and 0 for last-in-first-out order. Returns: nothing SEE ALSO: <1>inq_kbd_char <2>key_to_int <3>read_char ° put_parm put_parm (num, value) Usage: Sets the value of a parameter passed into a function. This allows values (strings or integers) to be returned to a function via the arguments, like Pascal VAR parameters. Parameters: Num ®int¯ is the parameter number to update, starting at 0. Value (int or string) is the new value to assign. Returns: Greater than 0 for success, 0 for failure. SEE ALSO: <1>get_parm ° raise_anchor raise_anchor () Usage: Removes the last mark made with 'drop_anchor' or 'mark'. Remember that there is a stack of marks, so this actually just pops an entry off the stack. Parameters: none Returns: nothing SEE ALSO: <1>drop_anchor <2>mark <3>inq_marked ° read read ([len]) Usage: Reads characters starting at the current cursor location. It can read from 1 character up to the remaining characters on the line (terminated by \n). The cursor does not move. Parameters: Len ®int¯ is the maximum characters to read. Returns: The string read. SEE ALSO: <1>insert ° read_char read_char () Usage: Read a keystroke from the keyboard buffer (if one is available). This function always returns immediately, with or without a valid key. Parameters: none Returns: The ASCII value ®int¯ of the keystroke in the low order byte, and the scan code in the high order byte. If no keystroke is available, -1 is returned. If the character was a special function code, the low order byte is 0 and the scan code is in the high order byte (see IBM Technical Reference or use the "key" macro to get scan codes). SEE ALSO: <1>inq_kbd_char <2>inq_kbd_flags ° read_file read_file ({fname}) Usage: Reads the contents of a file into the current buffer at the current cursor location. The cursor is positioned immediately after the imported data. Note that 'edit_file' and 'create_buffer' should be used for loading a file into a buffer of its own (because they are faster). Parameters: Fname ®string¯ is the name of the file to be read. The user will be prompted if fname is omitted. Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: <1>create_buffer <2>edit_file ° refresh refresh () Usage: Redraw the screen. BRIEF always redraws every time it is expecting a keystroke, but this is provided to allow updates at other times. Parameters: none Returns: nothing SEE ALSO: ° register_macro register_macro (type, command) Usage: Adds a command to the list of commands to be called automatically when a special event happens. Commands can be attached to 9 different types of events. Multiple commands attached to the same event type are called in the order registered. Parameters: Type ®int¯ is an event type. See table below. Command ®string¯ is the name of the command to register, but it may not be a language primitive. EVENT TYPES: 0 . . . . . Typed character inserted 1 . . . . . Different file was edited 2 . . . . . Alt-h pressed at prompt 3 . . . . . Unassigned key pressed (used only if '_invalid_key' does not exist) 4 . . . . . User was idle for one second 5 . . . . . BRIEF about to exit to DOS (via 'exit') 6 . . . . . New buffer created and a file read into it (via 'edit_file' or at startup) 7 . . . . . Ctrl-break pressed while a macro was running. 8 . . . . . Invalid character typed at a prompt. (see '_bad_key' also) Returns: nothing SEE ALSO: <1>call_registered_macro <2>unregister_macro <3>inq_idle_time <4>inq_idle_default <5>edit_file ° remember remember ({overwrite}) Usage: Starts recording a keystroke macro. If already recording, 'remember' stops the recording. Parameters: Overwrite ®string¯ contains "y" or "Y" to overwrite the current keystroke macro. Returns: 0 if remember was cancelled 1 if successful -1 if kestroke macro recording is paused SEE ALSO: <1>playback <2>save_keystroke_macro ° restore_position restore_position ([move]) Usage: Restores a position saved by 'save_position'. Positions are saved on a stack, so this is a pop operation. The position is restored in the buffer it was saved, but if this is not the current buffer, the buffer will NOT change. Parameters: Move ®int¯ is non-0 or omitted if the cursor should actually move to the old position, 0 if the stacked position should just be discarded. Returns: Greater than 0 for success, 0 or less for failure SEE ALSO: <1>inq_buffer <2>move_abs <3>move_rel <4>save_position ° returns returns (val) Usage: Sets the return value to be passed back to the calling function. This DOES NOT RETURN IMMEDIATELY, it only sets the return value. If neither 'returns' or 'return' are used, the return value is undefined. Parameters: Val ®int or string¯ is the return value sent to the caller. Returns: nothing SEE ALSO: ° right right () Usage: Moves the cursor one character to the right, even into the "virtual space" beyond the end of the characters on a line (but not past the max line length). Parameters: none Returns: Non-0 on success, 0 on failure (no movememt). SEE ALSO: <1>left <2>up <3>down <4>next_char <5>prev_char ° rindex rindex (string_to_search, pattern) Usage: Locates the last occurrence of pattern in string_to_search. The first character in the string is in position 1. If pattern is the null string, the result is undefined. See search_string to search a string using regular expressions. Parameters: String_to_search and pattern ®strings¯. Returns: The position of pattern in string_to_search, or 0 if it was not found. SEE ALSO: <1>index <2>search_string ° save_keystroke_macro save_keystroke_macro ({file_name}) Usage: Saves the keystroke macro currently in memory to a file. Parameters: File_name ®string¯ is the name of the save file. If there is no extension, .km is used. Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: <1>playback <2>remember ° save_position save_position () Usage: Saves the current position on the position stack (LIFO). Be sure to restore all saved positions, or memory will be consumed and eventually exhausted. Parameters: none Returns: nothing SEE ALSO: <1>restore_position <2>move_rel <3>move_abs <4>set_buffer ° search_back search_back ({patt}, [re], [case], [block], [full_len]) Usage: Searches the current buffer backward from the current position for a pattern. Parameters: Patt ®string¯ is the search pattern. Re ®int¯ is non-0 or omitted to use regular expressions, and 0 to use the pattern literally. If re is non-0, the type of regular expression matching is determined by the value: VALUE MATCH DIRECTION CLOSURE ----- --------------- ------- 1 left to right minimal 2 direction of search minimal 3 right to left minimal -1 left to right maximal -2 direction of search maximal -3 right to left maximal Case ®int¯ is 0 for case insensitive, non-0 for case sensitive, and omitted to use the current search_case value. Block ®int¯ is non-0 to confine the search to the currently marked block. Full_len ®int¯ is updated to the full length of the pattern matched if it is passed in as non-0. Otherwise, the return value gives length of match (based on cursor position after match, NOT the full pattern length) Returns: 0 if no match found, -1 if error, -2 if huge match (more than 65534 characters). Otherwise, the return value is the length of the matched text plus 1. Note that if there is a \c in the pattern, then the length returned is the distance from the cursor to the end of the pattern plus 1. SEE ALSO: <1>search_fwd <2>drop_anchor <3>mark <4>search_case <5>search_string <6>translate ° search_case search_case ([state]) Usage: Changes the case sensitivity flag for searches and translates (except 'search_string'). Parameters: State ®int¯ is 0 for case sensitive, non-0 for insensitive, and omitted to toggle the state. Returns: The previous state. SEE ALSO: <1>search_back <2>search_fwd <3>translate ° search_fwd search_fwd ({patt}, [re], [case], [block], [full_len]) Usage: Searches the current buffer forward from the current position for a pattern. Parameters: Patt ®string¯ is the search pattern. Re ®int¯ is non-0 or omitted to use regular expressions, and 0 to use the pattern literally. If re is non-0, the type of regular expression matching is determined by the value: VALUE MATCH DIRECTION CLOSURE ----- --------------- ------- 1 left to right minimal 2 direction of search minimal 3 right to left minimal -1 left to right maximal -2 direction of search maximal -3 right to left maximal Case ®int¯ is 0 for case insensitive, non-0 for case sensitive, and omitted to use the current search_case value. Block ®int¯ is non-0 to confine the search to the currently marked block. Full_len ®int¯ is updated to the full length of the pattern matched if it is passed in as non-0. Otherwise, the return value gives length of match (based on cursor position after match, NOT the full pattern length) Returns: 0 if no match found, -1 if error, -2 if huge match (more than 65534 characters). Otherwise, the return value is the length of the matched text plus 1. Note that if there is a \c in the pattern, then the length returned is the distance from the cursor to the end of the pattern plus 1. SEE ALSO: <1>search_back <2>drop_anchor <3>mark <4>search_case <5>search_string <6>translate ° search_string search_string (patt, str, [len], [re], [case]) Usage: Searches a string for a pattern. Parameters: Patt ®string¯ is the pattern to search for. Str ®string¯ is the string to be searched. Len ®int¯ returns the length of the match. Re ®int¯ is 0 to disable regular expressions, non-0 or omitted to use them. Case ®int¯ is 0 to disable case sensitivity, non-0 or omitted to enable it. Returns: The position ®int¯ in the string if a match occurred (first position is 1), 0 if the search fails. SEE ALSO: <1>index <2>rindex <3>search_fwd <4>search_back ° self_insert self_insert ([key_value]) Usage: Causes the ASCII value of a key to be inserted into a buffer. Used mainly to assign to typeable keys via 'assign_to_key'. It can also be used to insert a tab according to the "tab characters or spaces" flag. Parameters: Key_value ®int¯ is a key code (usually from 'read_char' or 'key_to_int') to be inserted. If omitted, the ASCII value of the last key typed is inserted into the buffer. Returns: nothing SEE ALSO: <1>assign_to_key <2>read_char <3>key_to_int ° set_backup set_backup (state) Usage: Controls whether backup files will be created. Parameters: State ®int¯ is 0 to turn off backup files, non-0 to turn them on. Returns: The previous state SEE ALSO: ° set_buffer set_buffer (buf_id) Usage: Makes a new buffer current. This does not affect the windows on screen or any attachment to a particular window. Registered macros are not called when the buffer is changed with 'set_buffer' and 'attach_buffer'. DANGER: be sure the current buffer is attached to the current window when process is called or the macro exits. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³WARNING: Hazardous to your program if incorrectly used. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Parameters: Buf_id ®int¯ is the new buffer id. Returns: Previous buffer id. SEE ALSO: <1>attach_buffer <2>create_buffer <3>delete_buffer <4>inq_buffer <5>next_buffer ° set_calling_name set_calling_name (name) Usage: Controls the return value of 'inq_called' in macros called by the current macro. This new value is used only until the current macro exits. Parameters: Name ®string¯ is the name to use in response to 'inq_called'. Returns: Nothing SEE ALSO: <1>inq_called ° set_msg_level set_msg_level (message_level) Usage: BRIEF can suppress certain types of messages. The message levels are: 0 all messages on (normal) 1 normal messages suppressed (from primitives) 2 error messages suppressed 3 error and normal messages suppressed During commands from the keyboard or during registered macros, BRIEF automatically sets level 1. The level returns to level 0 on return. Only message level 3 will suppress messages from 'message' and 'error' functions. Parameters: Message_level ®int¯ is the new message level. Returns: The previous message level. SEE ALSO: <1>error <2>inq_msg_level <3>message ° set_scrap_info set_scrap_info (insert_newline, [mark_type]) Usage: Sets info about the current scrap buffer. Parameters: Insert_newline ®int¯ is 0 to include the newline at the end of the buffer, non-0 to omit it. Mark_type ®int¯ is the type of mark to assign to the scrap. Returns: Nothing SEE ALSO: <1>drop_anchor <2>inq_scrap <3>paste ° set_top_left set_top_left ([top_line], [left_col], [window_id], [line], [col], [buffer_id]) Usage: Positions a buffer in a window. This is done by giving the coordinates in the window of the top left corner. window. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³WARNING: Hazardous to your program if incorrectly used. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Parameters: All are ®ints¯. Top_line and left_col are the line and column that should be placed at the top left corner of the window. If omitted, the current values are used. Window_id gives the window to use; omit it to use the current window. Line and col allow setting the current position in the buffer as well; omit them to leave the current position unchanged. Buffer_id can be used instead of window_id to specify the window indirectly. Only one of window_id and buffer_id should be used. Returns: Nothing SEE ALSO: <1>inq_top_left ° set_window set_window (window_id) Usage: Makes a window current, which also makes its associated buffer current. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³WARNING: Hazardous to your program if incorrectly used. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Parameters: Window_id ®int¯. Returns: Nothing SEE ALSO: <1>inq_window <2>next_window <3>change_window ° sprintf sprintf (output_string, control_string, [parameters ...]) Usage: Formatted output into a string, using control string format specifications (see manual). The maximum number of parameters allowed is 10. Parameters: Output_string ®string¯ is the destination for output. Control_string ®string¯ specifies the text and formatting of parameters. Parameters ®strings or ints¯ are used as specified by the control string. Returns: A copy of output_string after formatting. SEE ALSO: <1>printf <2>search_string ° strlen strlen (str) Usage: Get string length. Parameters: Str ®string¯ to measure. Returns: The size of the string. Tabs and newlines count as one character. SEE ALSO: <1>index <2>rindex <3>search_string ° substr substr (string, start_pos, [length]) Usage: Extracts a substring from a string. Parameters: String ®string¯ is the string from which to extract. Start_pos and length ®ints¯ specify the substring to extract. Character positions start at 1. If length is omitted, everything after start_pos is included. Returns: The spcified substring. SEE ALSO: <1>search_string <2>index <3>rindex ° swap_anchor swap_anchor () Usage: Swap the cursor and anchor positions. Parameters: None Returns: Nothing SEE ALSO: <1>drop_anchor <2>mark <3>raise_anchor ° tabs tabs (tab1, tab2, {tab3} ...) Usage: Set tab stops. The settings apply only to the current buffer. Column numbers start at 1, so tab stops can be anywhere from to the max line length. Tabs beyond the last specified value are set according to the distance between the previous two. Parameters: The tab stop values. They must be in ascending order. Returns: Nothing SEE ALSO: <1>distance_to_tab <2>use_tab_char ° time time (hours, minutes, seconds, hundredths) Usage: Gets the time. Parameters: Hours, minutes, seconds and hundredths ®ints¯ are returned with the current values. This is a military time, so hours go from 0 to 23. Returns: Nothing SEE ALSO: <1>date ° top_of_buffer top_of_buffer () Usage: Move to the very first character in the buffer. Parameters: None Returns: Non-0 for success (cursor moved), 0 for failure. SEE ALSO: <1>end_of_buffer <2>top_of_window <3>end_of_window ° top_of_window top_of_window () Usage: Move to the top line in the window. The column position is unchanged. Parameters: None Returns: Non-0 for success (cursor moved), 0 for failure. SEE ALSO: <1>end_of_buffer <2>top_of_buffer <3>end_of_window ° transfer transfer (source_id, start_line, start_col, end_line, end_col) Usage: Gets a block of text from one buffer and inserts it into the current buffer. The text is inserted at the cursor location. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³WARNING: Hazardous to your program if incorrectly used. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Parameters: Source_id ®int¯ specifies the source buffer. Start_line, start_col, end_line, and end_col ®ints¯ are the boundaries of the rectangular block in the source buffer to be transferred. Everything (including endpoints) in the block is included. Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: <1>copy <2>paste <3>cut ° translate translate ({patt}, {repl}, {global}, [re], [case], [block], [fwd]) Usage: Replaces occurrences of a pattern with a replacement string. Translation starts at the current position, and continues till end of buffer in the specified direction. Parameters: Patt ®string¯ the pattern. Repl ®string¯ is the substitute string. Global ®int¯ is non-0 for global translation, 0 for the first occurrence only. If omitted, BRIEF prompts for each change. Re ®int¯ is non-0 or omitted for regular expressions, 0 to treat patt as a literal. Re values are: VALUE MATCH DIRECTION CLOSURE ----- --------------- ------- 1 left to right minimal 2 direction of search minimal 3 right to left minimal -1 left to right maximal -2 direction of search maximal -3 right to left maximal Case ®int¯ is 0 for case insensitive, non-0 for case sensitive, and omitted to use the current search_case value. Block ®int¯ is non-0 to confine the search to the currently marked block. Fwd ®int¯ is non-0 or omitted for forward translation, 0 for backward. Returns: The number of replacements made. SEE ALSO: <1>search_back <2>search_case <3>search_fwd ° trim trim (input_string) Usage: Return a copy of a string with the trailing white space (space, tab, newline) removed. Parameters: Input_string ®string¯ will be trimmed. Returns: The trimmed string. SEE ALSO: <1>compress <2>ltrim ° undo undo () Usage: Undoes the last command from the keyboard. From a macro, 'undo' will only work of the buffer has not been modified since the last command. Undo information is lost when a buffer is written to disk. Undo information is kept for each buffer. If a command does not either change the current position, change a mark, or change the text, then it cannot be undone. Parameters: None Returns: Nothing SEE ALSO: ° unregister_macro unregister_macro (type, command_name) Usage: Removes a registered macro from the registered list. See 'register_macro'. Parameters: Type ®int¯ gives the event type. Command_name ®string¯ names the function to remove. Returns: Greater than 0 for success (it was registered), 0 or less otherwise. SEE ALSO: <1>call_registered_macro <2>register_macro ° up up() Usage: Move up a line. Parameters: None Returns: Non-0 for success (cursor moved), 0 for failure. SEE ALSO: <1>down <2>left <3>right ° upper upper (input_string) Usage: Convert a string to upper case. The input string is not altered itself. Parameters: Input_string ®string¯ will be converted. Returns: An uppercased copy of input_string. SEE ALSO: <1>lower ° use_local_keyboard use_local_keyboard (keyboard_id) Usage: Attaches a keyboard to the current buffer. Local keyboards are used before the global current keyboard. There can only be one local keyboard at a time for each buffer. See manual for more info. Parameters: Keyboard_id ®int¯ is the keyboard id. Use 0 to "unattach" a keyboard. Returns: Nothing SEE ALSO: <1>inq_local_keyboard <2>keyboard_pop <3>keyboard_push ° use_tab_char use_tab_char ({value}) Usage: Sets whether the tab key inserts spaces or a tab character. Parameters: Value ®string¯ is "y" to use tab characters, "n" to use spaces, omitted to toggle the current state. Returns: The previous state ®string¯: "n" or "y". SEE ALSO: <1>tabs ° version version () Usage: Show BRIEF version number on prompt line. Parameters: None Returns: version number * 100. SEE ALSO: ° window_color window_color ([color]) Usage: Set background color of borderless windows. Parameters: Color ®int¯ is the color to use. If omitted, the next color (after the current color) is used. See 'color'. Changing the background to the same as the foreground is an error. Returns: Non-0 for success, 0 for failure. SEE ALSO: <1>borders <2>inq_window_color <3>color ° write_block write_block ({filename}) Usage: Write a marked area to a file. Parameters: Filename ®string¯ specifies the file. Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: ° write_buffer write_buffer () Usage: Write buffer to disk. System buffers which have no file name attached to them cannot be written to disk. Parameters: None Returns: Greater than 0 for success, 0 or less for failure. SEE ALSO: ° key_table ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º TABLE OF KEY NAMES AND MODIFIERS º ºÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º KEY ³ VALID PREFIX (example: ) º ºÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º a-z, A-Z Alt- Ctrl- Shift- º ºÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º 0,1,3,4,5 Alt- Shift- Keypad- º º 7,8,9 Alt- Shift- Keypad- º º 2,6 Alt- Ctrl- Shift- Keypad- º ºÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º F1-F10 Alt- Ctrl- Shift- º ºÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º + Keypad- º º - Alt- Ctrl- Keypad- º º * Keypad- º º [ Ctrl- º º ] Ctrl- º ºÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º Tab Alt- (101) Shift- º º Esc Alt- (101) º º Enter Alt- (101) Ctrl- Keypad- º º Backspace Alt- Ctrl- º ºÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º Left Alt- (101) Ctrl- Shift- Keypad- º º Right Alt- (101) Ctrl- Shift- Keypad- º º Up Alt- (101) Shift- Keypad- º º Down Alt- (101) Shift- Keypad- º ºÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º Home Alt- (101) Ctrl- Shift- Keypad- º º End Alt- (101) Ctrl- Shift- Keypad- º º PgUp Alt- (101) Ctrl- Shift- Keypad- º º PgDn Alt- (101) Ctrl- Shift- Keypad- º ºÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º Ins Alt- (101) Shift- Keypad- º º Del Alt- (101) Shift- Keypad- º º Plus Alt- (101) Shift- Keypad- º º Minus Alt- (101) Shift- Keypad- º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ NOTE: (101) means valid with the 101 keyboard driver only SEE ALSO: <1>assign_to_key <2>inq_assignment <3>key_to_int ° operators ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º Macro operators º ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ º * Multiply integers º º / Divide integers º º + Add integers OR concatenate strings º º - Subtract integers º º % Modulo integers º º ++ Increment integer º º -- Decrement integer º ºÄÄÄÄÄÄ TESTS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º == Equal (string or int) º º != Not equal (string or int) º º <= Less or equal (string or int) º º >= Greater or equal (string or int) º º < Less than (string or int) º º > Greater than (string or int) º º above Unsigned int greater than (macro) º º above_eq Unsigned int greater than (macro) º º below Unsigned int greater than (macro) º º below_eq Unsigned int greater than (macro) º ºÄÄÄÄÄÄÄ LOGICAL OPERATORS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º ! NOT logical º º || OR logical º º && AND logical º ºÄÄÄÄÄÄÄ BITWISE OPERATORS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º & AND bitwise º º ~ NOT bitwise (invert all bits) º º | OR bitwise º ºÄÄÄÄÄÄÄ ASSIGNMENT ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĺ º = Assignment º º += Add and assign º º -= Subtract and assign º º *= Multiply and assign º º /= Divide and assign º º %= Modulo and assign º º &= Bitwise AND and assign º º |= Bitwise OR and assign º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ° flow control break Exit from the innermost while, do, or for loop. NOTE: break is not needed in switch statements...and if issued, it will still break out of the nearest loop! continue Jumps back to the top of the nearest for, while or do loop. if, else Implements the standard if-then-else. The else is optional. if (condition) { if_statements } [else] { else_statements } return Terminate the current macro and return the given value. switch Lets you specify an outcome for each of a number of possible values of a variable. The case variables must be CONSTANT integers. switch (condition) { case CONSTANT: statement; case CONSTANT: statement; [default: statement;] } NOTE: break is not needed in switch statements...and if issued, it will still break out of the nearest loop! while While-loop construct. Executes statements while the condition is non-0. The condition is tested before each iteration of the loop. while (condition) { statements; } for This is equivalent to the C language FOR construct. When the for function starts, initialize is evaluated once. Then the condition is evaluated and if the result is non-0, the statements are executed. Finally, increment is evaluated, and control returns to the condition evaluation. The process is repeated from here until condition evaluates as 0. See the manual for more info. for (initialize; condition; increment) { statements; } ° declarations int Declares integer variables. Within a macro, these are local, automatic variables visible only to the current macro. Outside a macro, they are visible anywhere within the file. Either type can be made global using the 'global' modifier. Initialization is allowed on the declaration line. int var_name1 [var_name2 ...]; int var_name1 = 24; string Declares string variables. Within a macro, these are local, automatic variables visible only to the current macro. Outside a macro, they are visible anywhere within the file. Either type can be made global using the 'global' modifier. Length of strings is limited by the max line length or 144, whichever is greater. string var_name1, [var_name2 ...]; global Declares global variables. These are visible in any macro, even those in other files (see extern). Global can be used by itself or as a modifier for 'int' and 'string'. Variables must be declared global in only one file. global name1 [name2] ...; global int num1 [num2] ...; global string str1 [str2] ...; extern Declares variables (or macros) defined in other files. extern int1, int2; extern string1, string2; extern macro1(), macro2(); ° bmhelp "bmhelp,quick_bmhelp" To get help on concepts or commands:  Press Ctrl-h (or whatever key "bmhelp" is assigned to)  If the cursor is on the name of the macro you want help on, then just press enter...the BMHELP package will grab the macro name and zoom to the help screen for that macro.  Otherwise, use the Up and Down arrows to select a catagory or macro name you are interested in.  Press Enter Repeat this process until a help screen appears.  Esc returns you to your editing session  Grey/Keypad minus returns you to the previous menu  Insert places a template for the macro at the cursor location  On the SEE ALSO line, keys surrounded by <> can be used to zoom to another entry. Pressing "p" will return to the original macro after a zoom. °