| abs | any abs(any v); Returns absolute value of a number Source file: FUN.L | |
| access | bool access(string path); Returns true if a file or directory exists Source file: FUN.L | |
| access | bool access(string path, string mode); Returns true if a file or directory can be accessed as requested Source file: FUN.L | |
| access_dir | bool access_dir(string path); Returns true if a directory can be accessed Source file: FUN.L . Include a specific file name or "*.*". | |
| access_drive | bool access_drive(string drive); Returns true if a drive can be accessed Source file: FUN.L | |
| acos | real acos(real x); Returns the arccosine in radians Source file: FUN.L | |
| any_to_rgb | long any_to_rgb(any color); Convert a color code, pen, or brush to an RGB value Source file: COLOR.L | |
| appMessageHandler | void appMessageHandler(long h, char * _text, char * _caption); Source file: EPP.L | |
| appMessageHandler | void appMessageHandler(long i, char * j, char * k); Helper function to display a message box Source file: MSGBOX.L . Flag values are the Windows API falg bits. | |
| arg_list | string arg_list(array args); Returns a formatted argument list (using space as separator) Source file: FUN.L . See Also: arg_string, parse_arguments | |
| arg_list | string arg_list(array args, string separator); Returns a formatted argument list Source file: FUN.L . See Also: arg_string, parse_arguments | |
| arg_string | string arg_string(string s); Formats a string for use as a command line argument Source file: FUN.L . See Also: arg_list, parse_arguments | |
| asin | real asin(real x); Returns the arcsine in radians Source file: FUN.L | |
| ask | any ask(); Prompt the user for a text value Source file: PROMPT.L . The prompt will be "Enter Data". . The field will be blank. . The field will be twenty characters wide. | |
| ask | any ask(string prompt); Prompt the user for a text value Source file: PROMPT.L . Prompt string to be displayed for user. If null, a prompt of . "Enter Data" is used. . The field will be blank. . The field will be twenty characters wide. | |
| ask | any ask(string prompt, any default_value); Prompt the user for a text value Source file: PROMPT.L . Prompt string to be displayed for user. If null, a prompt of . "Enter Data" is used. . A default value will be displayed in field. . The field will be twenty characters wide. | |
| ask | any ask(string prompt, any default_value, int columns); Prompt the user for a text value Source file: PROMPT.L . Prompt string to be displayed for user. If null, a prompt of . "Enter Data" is used. . A default value will be displayed in field. . The field will be the specified number of columns wide. | |
| ask_int | any ask_int(); Prompt the user for an integer Source file: PROMPT.L . The prompt will be "Enter Data". . The field will be blank. . The field will be six digits wide. | |
| ask_int | any ask_int(string prompt); Prompt the user for an integer Source file: PROMPT.L . Prompt string to be displayed for user. If null, a prompt of . "Enter Data" is used. . The field will be blank. . The field will be six digits wide. | |
| ask_int | any ask_int(string prompt, any default_value); Prompt the user for an integer Source file: PROMPT.L . Prompt string to be displayed for user. If null, a prompt of . "Enter Data" is used. . A default value will be displayed in field. . The field will be six digits wide. | |
| ask_int | any ask_int(string prompt, any default_value, int columns); Prompt the user for an integer Source file: PROMPT.L . Prompt string to be displayed for user. If null, a prompt of . "Enter Data" is used. . A default value will be displayed in field. . The field will be the specified number of columns wide. | |
| ask_number | any ask_number(); Prompt the user for a number (integer or real) Source file: PROMPT.L . The prompt will be "Enter Data". . The field will be blank. . The field will be six digits wide. | |
| ask_number | any ask_number(string prompt); Prompt the user for a number (integer or real) Source file: PROMPT.L . Prompt string to be displayed for user. If null, a prompt of . "Enter Data" is used. . The field will be blank. . The field will be six digits wide. | |
| ask_number | any ask_number(string prompt, num default_value); Prompt the user for a number (integer or real) Source file: PROMPT.L . Prompt string to be displayed for user. If null, a prompt of . "Enter Data" is used. . A default value will be displayed in field. . The field will be six digits wide. | |
| ask_number | any ask_number(string prompt, num default_value, int columns); Prompt the user for a number (integer or real) Source file: PROMPT.L . Prompt string to be displayed for user. If null, a prompt of . "Enter Data" is used. . A default value will be displayed in field. . The field will be the specified number of columns wide. | |
| ask_password | any ask_password(); Prompt the user for a password Source file: PROMPT.L . The prompt will be "Enter Password". . The field will be blank. . The field will be eight characters wide. | |
| ask_password | any ask_password(string prompt); Prompt the user for a password Source file: PROMPT.L . Prompt string to be displayed for user. If null, a prompt of . "Enter Password" is used. . The field will be blank. . The field will be eight characters wide. | |
| ask_password | any ask_password(string prompt, int columns); Prompt the user for a password Source file: PROMPT.L . Prompt string to be displayed for user. If null, a prompt of . "Enter Password" is used. . A default value will be displayed in field. . The field will be the specified number of columns wide. | |
| aspect_x | int aspect_x(); Returns the X component of the screen aspect ratio Source file: FUN.L | |
| aspect_x_y | int aspect_x_y(); Returns the diagonal component of the screen aspect ratio Source file: FUN.L | |
| aspect_y | int aspect_y(); Returns the Y component of the screen aspect ratio Source file: FUN.L | |
| at | void at(); Displays current function and line # in a message box Source file: FUN.L . Also prompts the user whether to continue or to exit. | |
| at | void at(string text); Displays text, current function, and line # in a message box Source file: FUN.L . Also prompts the user whether to continue or to exit. | |
| atan | real atan(real x); Returns the arctangent in radians Source file: FUN.L | |
| atan2 | real atan2(real y, real x); Returns the arctangent in radians Source file: FUN.L | |
| atof | double atof(any v); Converts any value to a real Source file: FUN.L | |
| atoi | int atoi(any v); Converts any value to an integer Source file: FUN.L | |
| atol | long atol(any v); Converts any value to an integer Source file: FUN.L | |
| beep | void beep(); Emits a beep on the system speaker Source file: FUN.L | |
| beep | void beep(int n); Emits a number of beeps on the system speaker Source file: FUN.L | |
| bits_per_pixel | int bits_per_pixel(); Returns the number of bits per pixel for the display Source file: FUN.L . Note: Since the display may have more than one "plane" (see . "num_planes"), the the effective number of bits per pixel is . gotten by multiplying: bits_per_pixel () * num_planes (). . See Also: num_colors, num_planes | |
| browse | void browse(any obj); Browse an object Source file: BROWSER.L . This is intended for debugging applications. . . See also: the object_browser class | |
| browse_as_array | void browse_as_array(any obj); Browse an object as if an array Source file: BROWSER.L . This is intended for debugging applications. . . See also: browse, browse_members, the object_browser class | |
| browse_as_memory | void browse_as_memory(any obj); Browse an object as if memory Source file: BROWSER.L . This is intended for debugging applications. . . See also: browse, browse_members, the object_browser class | |
| browse_as_object | void browse_as_object(any obj); Browse an object's members (even for an array) Source file: BROWSER.L . This is intended for debugging applications. . . See also: browse, browse_as_array, the object_browser class | |
| browse_as_string | void browse_as_string(any obj); Browse an object as if a string Source file: BROWSER.L . This is intended for debugging applications. . . See also: browse, browse_members, the object_browser class | |
| browse_as_text_array | void browse_as_text_array(any obj); Browse an object as if an array of text lines Source file: BROWSER.L . This is intended for debugging applications. . . See also: browse, browse_members, the object_browser class | |
| browse_globals | void browse_globals(); Bring up the Global Variable Browser Source file: BROWSER.L | |
| browse_opcode_frequency | void browse_opcode_frequency(); Show opcode frequency table in a window Source file: INTERP.L | |
| call | any call(string fname); Calls a named non-member function Source file: FUN.L | |
| call | any call(string fname, any v); Calls a named non-member function with one argument Source file: FUN.L | |
| call | any call(string fname, any v1, any v2); Calls a named non-member function with two arguments Source file: FUN.L | |
| call | any call(string fname, any v1, any v2, any v3); Calls a named non-member function with three arguments Source file: FUN.L | |
| call | any call(string fname, any v1, any v2, any v3, any v4); Calls a named non-member function with four arguments Source file: FUN.L | |
| call_count | long call_count(); Returns the number of function calls performed by the application Source file: FUN.L | |
| caller_class | string caller_class(); The name of the class of the object that invoked this function Source file: FUN.L | |
| caller_function | string caller_function(); The name of the function that invoked this function Source file: FUN.L | |
| caller_line | int caller_line(); The source line number of the call to this function Source file: FUN.L | |
| caller_object | any caller_object(); "this" for the class which called this function Source file: FUN.L | |
| caller_path | string caller_path(); The source file for the call to this function Source file: FUN.L | |
| call_nesting | long call_nesting(); Returns the current nesting level of function calls Source file: FUN.L | |
| call_nesting_limit | long call_nesting_limit(); Returns the limit of function call nesting Source file: FUN.L . A fatal error message will be displayed when this nesting level . is reached. The user will have the option of continuing (in . which case further checking is disabled.) | |
| call_nesting_limit | long call_nesting_limit(long n); Sets the limit for function call nesting Source file: FUN.L . The default is 300 levels | |
| ceil | real ceil(real x); Returns the smallest whole number greater than the argument Source file: FUN.L . See Also: floor, round, trunc | |
| chdir | bool chdir(string dir); Change the current working directory Source file: FUN.L . See also: getcwd | |
| choose_color | long choose_color(); Prompt user for a color (defaults to white) Source file: COLOR.L . Uses the Windows Color common dialog box. | |
| choose_color | long choose_color(any rgb); Prompt user for a color with a default color Source file: COLOR.L . Uses the Windows Color common dialog box. | |
| choose_file | string choose_file(); Prompt user to select an input file (from all files) Source file: FILE.L | |
| choose_file | string choose_file(string path); Prompt user to select an input file with a default path Source file: FILE.L | |
| choose_file | string choose_file(string path, string type_text); Prompt user to select an input file with default path and named type Source file: FILE.L . path may be a single file with type or a sequence of types . separated by semicolons. Each type is preceded by an asterisk . and a dot. . If a sequence of types, type_text must be a sequence of type . names separated by semicolons. | |
| choose_file | string choose_file(string path, string type_text, string access); Prompt user to select a file with default path and named type Source file: FILE.L . path may be a single file with type or a sequence of types . separated by semicolons. Each type is preceded by an asterisk . and a dot. At item in the sequence can itself be a semicolon . separated list of types if enclosed within parentheses. . If a sequence of types, type_text must be a sequence of type . names separated by semicolons. . Access may be "r" for input files and "w" for output files. | |
| choose_font | font choose_font(); Prompt user for font selection (current window font as default) Source file: FONT.L . Uses the Windows Font common dialog box. | |
| choose_font | font choose_font(font font); Prompt user for font selection with a default font Source file: FONT.L . Uses the Windows Font common dialog box. | |
| chsize | int chsize(int handle, long size); Change the size of an open file Source file: FUN.L | |
| cleanup_path | string cleanup_path(string path); Clean up a path Source file: FUN.L . Make sure it is upper case. | |
| code | short code(string ch); Returns the integer character code for the first character of a string Source file: FUN.L | |
| cons | cons cons(any car, any cdr); Create a "cons" object to hold two objects Source file: LISP.L | |
| control_font | font control_font(); Returns the default control font Source file: FONT.L | |
| copy_file | bool copy_file(string dest_path, string source_path); Copy a file Source file: FILE.L . Leaves error code from the "file_copier" class in the . "copy_file_error" global variable. | |
| copy_file | bool copy_file(string dest_path, string source_path, long block_size); Copy a file using specified buffer size (in bytes) Source file: FILE.L . Leaves error code from the "file_copier" class in the . "copy_file_error" global variable. | |
| copy_files | bool copy_files(string dest_dir, string source_path); First path is for name of target directory. Source file: FILE.L . Second path has wildcard file name. . Returns false if a file could not be copied. . Creates the target directory if it does not exist. | |
| cos | real cos(real x); Returns the cosine of the argument in radians Source file: FUN.L | |
| ctime | string ctime(); Returns the current date and time as a string Source file: FUN.L . Format is the same as in C but without the newline. | |
| ctime | string ctime(long time); Returns the specified date and time as a string Source file: FUN.L . Format is the same as in C but without the newline. | |
| daylight | bool daylight(); Returns true if daylight savings time is in effect Source file: FUN.L | |
| day_month_year | string day_month_year(); Returns current date in format "DD Month YYYY" Source file: FUN.L | |
| day_month_year | string day_month_year(long time); Returns a date/time in format "DD Month YYYY" Source file: FUN.L | |
| dde_init | void dde_init(); Source file: SERVICE.L | |
| decl | bool decl(string text); Dynamically load Liana declarations from a string Source file: LCL.L | |
| decl | bool decl(string text, string path); Dynamically load Liana declarations from a string that came from a file Source file: LCL.L . This function is used instead of the single-argument version so that . any error messages include the source path. | |
| default_dialog_background | long default_dialog_background(); Returns the default RGB color for dialog box background Source file: WINDOW.L . This retrieves the system value for dialog box background which is . typically white for Windows 3.11 and earlier and Windows NT 3.52 . and earlier. For newer versions, the color is typically gray. | |
| default_font | font default_font(); Returns the default font Source file: FONT.L | |
| default_library | void default_library(); Clear the library list and resort to the default library. Source file: LCL.L | |
| default_path | string default_path(string path, string def_path); Apply defaults to a path Source file: FUN.L . If directory, file name, or extension are missing from the first . path, they are supplied from second path. | |
| default_text_color | long default_text_color(); Returns the default RGB color for window text Source file: WINDOW.L . This retrieves the system value for window text color which is . typically black. | |
| default_window_background | long default_window_background(); Returns the default RGB color for window background Source file: WINDOW.L . This retrieves the system value for window background which is . typically white. | |
| degrees | real degrees(real x); Converts an angle from radians to degrees Source file: FUN.L | |
| descriptor | any descriptor(long v); Convert a value to its 32-bit integer value descriptor Source file: FUN.L | |
| dialog_font | font dialog_font(); Returns the default dialog font Source file: FONT.L | |
| dir | string dir(string path); Returns the drive and directory of a path Source file: FUN.L . The directory (if any) includes a terminating slash | |
| dir_no_slash | string dir_no_slash(string dir); Strips the trailing slash (if) any from a directory Source file: FUN.L | |
| dir_slash | string dir_slash(string dir); Assures that a directory has a trailing slash Source file: FUN.L . Also expands a partial directory | |
| dos_version | string dos_version(); Returns the underlying operating system version number (nn.mm) Source file: FUN.L . This is the DOS version number for DOS-based systems. . See Also: os_version | |
| drive | string drive(string path); Returns the drive from a path Source file: FUN.L | |
| dump_globals | bool dump_globals(string path); Output the values of all global variables to a file Source file: INTERP.L | |
| error | void error(string caption, string text); Display an error message in a message box with a caption Source file: MSGBOX.L . The message box will use the "Stop" icon. . It will have an "OK" button. | |
| error | void error(string text); Display an error message in a message box Source file: MSGBOX.L . The message box will use the "STOP" icon. . It will have an "OK" button. . The application name ("apname" global variable) will be used as . the message box caption. | |
| error_yes_no_cancel | any error_yes_no_cancel(string caption, string text); Display an error message in a message box with Yes/No/Cancel buttons and caption Source file: MSGBOX.L . The message box will use the "STOP" icon. . It will have the "Yes", "No", and "Cancel" buttons which will . return true, false, and "cancel". | |
| error_yes_no_cancel | any error_yes_no_cancel(string text); Display an error message in a message box with Yes/No/Cancel buttons Source file: MSGBOX.L . The message box will use the "STOP" icon. . It will have the "Yes", "No", and "Cancel" buttons which will . return true, false, and "cancel". . The application name ("apname" global variable) will be used as . the message box caption. | |
| eval | any eval(string expr); Dynamically evaluate an expression string Source file: LCL.L . Returns the expression value or a special value if there is . an error. This special error value can be checked for by . calling the "is_error" member function for the return value. | |
| exit | void exit(); Exit from the application with a return code of 0 Source file: FUN.L | |
| exit | void exit(int value); Exit from the application with a return code Source file: FUN.L | |
| exit_windows | bool exit_windows(); Exit from Windows (or logoff on Windows NT) Source file: WINDOW.L | |
| exp | real exp(real x); Raises "e" to an exponent Source file: FUN.L | |
| ext | string ext(string path); Returns the file extension (if any) of a path Source file: FUN.L . Includes the leading ".", but not is there was no extension in . the path. | |
| fabs | real fabs(real x); Returns the absolute value of a real number Source file: FUN.L . This is different from "abs" in that the result will be a real . regardless of the operand type. | |
| fatal_error | bool fatal_error(string msg, int line, string class_name, string function, string path); Called be interpreter on a fatal error Source file: INTERP.L . Application will be terminated if it returns false . It calls "show_fatal_error" to display the error message and prompt . the user whether to continue. | |
| fclose | void fclose(file f); Close a file Source file: FUN.L . File must be opened by "fopen" or "file::open" or "new file". | |
| filelength | long filelength(string path); Returns the size, in bytes, of a file Source file: FUN.L . Returns -1 if file cannot be accessed. | |
| find_file | string find_file(string path); Find a file given a starting directory and file name Source file: FINDFILE.L | |
| find_popup_parent | window find_popup_parent(); Finds the window to use as parent for a popup window Source file: MSGBOX.L . This function is called by the message box and dialog box . functions to automatically determine which window to use as . the parent for a message/dialog box. . This is either the window with the input focus, the window in . the global variable "w", the window in the global variable "fw", . or null, in that order. | |
| find_text | bool find_text(window ed); Prompt user for a search string Source file: FINDTEXT.L . Argument is the line editor control. . Assumes forward search. . Uses the Windows Find common dialog box. | |
| find_text | bool find_text(window ed, bool search_forward); Prompt user for a search string with default search direction Source file: FINDTEXT.L . Argument is the line editor control. . Uses the Windows Find common dialog box. | |
| fixed_font | font fixed_font(); Returns the fixed-pitch system font Source file: FONT.L | |
| floor | real floor(real v); Returns the largest whole number less than the argument Source file: FUN.L . See Also: ceil, round, trunc | |
| fmod | real fmod(real x, real y); Returns the floating point remainder Source file: FUN.L | |
| fname | string fname(string path); Returns the file name portion of a path Source file: FUN.L | |
| fname_ext | string fname_ext(string path); Returns the file name and extension portions of a path Source file: FUN.L . They will be separated by a "." unless there was no "." present . in the path. | |
| font_families | array font_families(); Returns an array of all the font family typeface names Source file: FONT.L . For fonts available for drawing on the screen. | |
| fopen | file fopen(string path); Open a file for input Source file: FUN.L . This is equivalent to: fopen (path, "r"). | |
| fopen | file fopen(string path, string access); Open a file for input or output Source file: FUN.L . The access is "r" for reading, "w" for writing, "rw" for reading . and writing, or "a" for appending to the end of file. . In addition, an "x" may be appended to the access to open for . exclusive (non-shared) access. The default is shared access. . In addition, a "c" may be added as the first character of the . access to force the file to be created if it does not exist . already (this is commonly used with append access: "ca".) . . The return value is a "file" object. See the "file" class for . detailed functions. . . See Also: fprintf and fclose | |
| format_money | string format_money(num n); Format a number as money with two decimal digits Source file: FUN.L . Commas between the thousands, 2 decimal digits . Uses ::ch_comma to override "," for the comma character. . Uses ::ch_decimal_point to override "." for the decimal point. | |
| format_money | string format_money(num n, int num_digits); Format a number as money with specified precision Source file: FUN.L . Commas between the thousands, specified decimal digits . Uses ::ch_comma to override "," for the comma character. . Uses ::ch_decimal_point to override "." for the decimal point. | |
| format_ms | string format_ms(long time_ms); Convert a time (in millisec.) to text: HH:MM:SS.MMM Source file: FUN.L | |
| format_rgb | string format_rgb(any v); Format a color code as an R,G,B string Source file: COLOR.L . For example, format_rgb ("r") would return "255,0,0". | |
| format_rgb | string format_rgb(int red, int green, int blue); Format R, G, and B component values as an R,G,B string Source file: COLOR.L . For example, format_rgb (255, 192, 0) would return "255,192,0". | |
| format_thousands | string format_thousands(num n); Format a number as thousands Source file: FUN.L . Commas between the thousands, no decimal digits . Uses ::ch_comma to override "," for the comma character. | |
| fprintf | void fprintf(file f, string format, any args...); Output a formatted string to a file Source file: FUN.L . See "printf" for format codes. | |
| free | void free(any object); Primarily used for "malloc" memory blocks. Source file: FUN.L | |
| free_list_size | long free_list_size(); Returns the number of bytes available in the internal "free list" Source file: FUN.L | |
| free_vector | void free_vector(memory v); Free a string vector Source file: FUN.L . See Also: string_vector | |
| full_path | string full_path(string path); Expands a path to include the complete directory Source file: FUN.L | |
| get_ap_names | array get_ap_names(); Returns a list of the sections (applications) in WIN.INI Source file: FUN.L | |
| get_byte | unsigned char get_byte(memory buf, long offset); Fetches the byte (as an integer) at an offset in a buffer. Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_bytes | memory get_bytes(memory buf, long offset, long n); Fetch n bytes from an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_char | char get_char(memory buf, long offset); Returns the character code at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| getcwd | string getcwd(); Returns the current working directory Source file: FUN.L . No trailing slash except for root directory. | |
| getdcwd | string getdcwd(string drive); Returns the current working directory for a drive Source file: FUN.L . No trailing slash except for root directory. | |
| get_disk_free_space | long get_disk_free_space(string path); Returns the amount of free space on a drive in bytes Source file: FUN.L | |
| get_double | double get_double(memory buf, long offset); Returns the double precision float at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_drive_mapping | string get_drive_mapping(string drive); Get the network path for a mapped drive Source file: FUN.L . See Also: map_drive, unmap_drive | |
| getenv | string getenv(string apname, string key); Returns the value of a keyword from WIN.INI Source file: FUN.L | |
| getenv | string getenv(string apname, string key, string default1); Returns the value of a keyword from WIN.INI with a default value Source file: FUN.L | |
| getenv | string getenv(string name); Returns the value of a DOS environment variable Source file: FUN.L | |
| getenv_names | array getenv_names(string apname); Returns a list of keywords from WIN.INI for an application Source file: FUN.L | |
| get_free_gdi_resources | int get_free_gdi_resources(); Source file: WIN.L | |
| get_free_system_resources | int get_free_system_resources(); Source file: WIN.L | |
| get_free_user_resources | int get_free_user_resources(); Source file: WIN.L | |
| get_int | int get_int(memory buf, long offset); Returns the integer at an offset in a buffer Source file: FUN.L . This is a 16-bit integer for Windows and a 32-bit integer for Win32. . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_long | long get_long(memory buf, long offset); Returns the 32-bit integer at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_op_frequency | void get_op_frequency(char * buf); Copy the opcode execution frequency table into a buffer Source file: FUN.L | |
| get_short | short get_short(memory buf, long offset); Returns the 16-bit integer at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_string | any get_string(memory buf); Returns the NUL-terminated string from a buffer Source file: FUN.L . This is equivalent to get_string (buf, 0). . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_string | any get_string(memory buf, long offset); Returns the NUL-terminated string at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_symbol_index | int get_symbol_index(string path); Source file: FIGURE.L | |
| get_timer | timer get_timer(); Source file: TIMER.L | |
| get_unsigned | unsigned get_unsigned(memory buf, long offset); Returns the unsigned integer at an offset in a buffer Source file: FUN.L . This is a 16-bit integer for Windows and a 32-bit integer for Win32. . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_unsigned_char | unsigned char get_unsigned_char(memory buf, long offset); Returns the byte at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_unsigned_long | unsigned long get_unsigned_long(memory buf, long offset); Returns the 32-bit unsigned integer at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_unsigned_short | unsigned short get_unsigned_short(memory buf, long offset); Returns the 16-bit unsigned integer at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| get_win_dir | string get_win_dir(); Get the Windows directory Source file: FUN.L . No trailing slash. | |
| get_win_sys_dir | string get_win_sys_dir(); Returns the Windows system directory Source file: FUN.L . No trailing slash. | |
| grayed_menu_item | menu_item grayed_menu_item(string text); Source file: MENU.L | |
| hex | string hex(unsigned long value); Converts an unsigned integer to a hexadecimal string Source file: FUN.L | |
| hex | string hex(unsigned long value, int n); Converts an unsigned integer to a hexadecimal string of n digits Source file: FUN.L | |
| hh_mm | string hh_mm(); Returns current time in format "10:45" Source file: FUN.L | |
| hh_mm | string hh_mm(long time); Returns a time in format "10:45" Source file: FUN.L | |
| hh_mm_mm | string hh_mm_mm(); Returns current time in format "10:45 PM" Source file: FUN.L . No leading zero for hour. | |
| hh_mm_mm | string hh_mm_mm(long time); Returns a time in format "10:45 PM" Source file: FUN.L . No leading zero for hour. | |
| hiword | unsigned hiword(unsigned long x); Returns the "high" 16-bit unsigned word of a 32-bit integer Source file: FUN.L | |
| hypot | real hypot(real x, real y); Returns the diagonal given two sides of a rectangle Source file: FUN.L | |
| icon_height | int icon_height(); Returns the height of an icon Source file: FUN.L | |
| icon_width | int icon_width(); Returns the width of an icon Source file: FUN.L | |
| inform | void inform(string caption, string text); Display an information message in a message box with caption Source file: MSGBOX.L . The message box will use the "i" icon. . It will have an "OK" button. | |
| inform | void inform(string text); Display an information message in a message box Source file: MSGBOX.L . The message box will use the "i" icon. . It will have an "OK" button. . The application name ("apname" global variable) will be used as . the message box caption. | |
| init_lcl | liana_compile_link init_lcl(); Make sure that the Liana compiler/linker is initialized Source file: LCL.L | |
| isalnum | bool isalnum(string s); Returns true if all characters of a string are alphanumeric Source file: FUN.L . Returns false for empty string or null. | |
| isalpha | bool isalpha(string s); Returns true if all characters of a string are alphabetic Source file: FUN.L . Returns false for empty string or null. | |
| isdigit | bool isdigit(string s); Returns true if all characters of a string are digits Source file: FUN.L . Returns false for empty string or null. | |
| is_dir | bool is_dir(string s); Returns true if a path is a directory Source file: FUN.L | |
| islower | bool islower(string s); Returns true if a string does not contain any upper case letters Source file: FUN.L | |
| isspace | bool isspace(string s); Returns true if all characters of a string are white space Source file: FUN.L . White space is blank, tab, new line, carriage return, form feed, . and vertical tab. . Returns false for empty string or null. | |
| isupper | bool isupper(string s); Returns true if a string does not contain any lower case letters Source file: FUN.L | |
| is_wild | bool is_wild(string s); Returns true if string contains any wild characters Source file: FUN.L . The wild characters are "*" and "?". | |
| keyhole_debugger | void keyhole_debugger(); Prompt user for Liana expression to evaluate Source file: DBSTUB.L . This function merely calls the _keyhole_debugger function. . The application may provide its own definition of this function . to intercept control before _keyhole_debugger is called. | |
| library | void library(string path); Add a library to front of library list. Source file: LCL.L . Libraries are searched in the reverse of the order they were added . to the list (so that you can easily override a previous library.) | |
| lines_to_string | memory lines_to_string(array a); Converts an array of strings to text file format Source file: FUN.L . CRLFs are inserted after each line. | |
| load_decl | bool load_decl(string path); Dynamically load Liana declarations from a source text file Source file: LCL.L | |
| load_file | memory load_file(string path); Loads an entire text file as a memory buffer Source file: FILE.L . Returns the buffer or null if unsuccessful. . The "file_error_code" global variable will be set to indicate . any failure: null for success, "open", "read", or "close". | |
| load_file | memory load_file(string path, long buf_size); Loads an entire text file as a memory buffer with minimum size Source file: FILE.L . Returns the buffer or null if unsuccessful. . The minimum size is used to avoid memory fragmentation when a . large number of files will be loaded and released (i.e., load . a file, release it, load another file, release it, and so on.) . A minimum size of 0 allocates exactly the amount needed (plus . one byte to NUL terminate the buffer in case it is used as a . string. If the file is larger than the minimum size, a multiple . of the size is used. . The "file_error_code" global variable will be set to indicate . any failure: null for success, "open", "read", or "close". | |
| load_library | bool load_library(); Force the Liana runtime library to be loaded Source file: LCL.L | |
| load_lines | array load_lines(array a, string path); Load a text file as lines into an existing array Source file: FILE.L | |
| load_lines | array load_lines(array a, string path, long i); Insert the lines of a text file into an existing array Source file: FILE.L | |
| load_lines | array load_lines(string path); Load a text file as an array of lines Source file: FILE.L . Line terminaters are removed. | |
| localtime | int localtime(long t, int i); Returns a member of the "TM" structure for a date/time Source file: FUN.L | |
| log | real log(real x); Returns the natural logarithm of a number Source file: FUN.L | |
| log10 | real log10(real x); Returns the base 10 logarithm of a number Source file: FUN.L | |
| log_mci_calls | bool log_mci_calls(bool log_calls); Source file: VIDEO.L | |
| loword | unsigned loword(unsigned long x); Returns the "low" 16-bit word of a 32-bit integer Source file: FUN.L | |
| lstub_icon_handle | unsigned lstub_icon_handle(); Source file: ICON.L | |
| lzexpand | bool lzexpand(string source, string dest); Expand a LZ compressed file Source file: FILE.L | |
| make_callback | string make_callback(string label); Make a default callback function name Source file: FUN.L . Default the callback to a simplification of label text: . - Ignore leading embedded controls (e.g., !x!-). . - Convert all text to lower case. . - Ignore all special characters. . - Replace blanks with underscores. . - Ignore text after (and including) tab character. */ | |
| make_long | unsigned long make_long(unsigned short lo, unsigned short hi); Returns 32-bit integer formed from two 16-bit unsigned words Source file: FUN.L | |
| make_path | string make_path(string dir, string fname, string ext); Form a path from directory, file name, and extension Source file: FUN.L . Directory includes drive. | |
| make_path | string make_path(string dir, string fname_ext); Form a path from directory and file name (with extension) Source file: FUN.L | |
| malloc | any malloc(long size); Allocate a block of memory Source file: FUN.L . If less then 8192 bytes it will be within the Liana workspace. . Larger blocks are allocated from the Windows Global heap. . Be sure to call the "free" function for those large blocks . that are in the Windows Global heap since Liana cannot keep . track of their usage. | |
| map_drive | bool map_drive(string drive, string password, string network_path); Map a drive letter to a network path Source file: FUN.L . See Also: unmap_drive, get_drive_mapping | |
| matherr | any matherr(string type, string name, real arg1, real arg2, real retval, int line, string class_name, string function, string path); Handle runtime math errors Source file: INTERP.L . The default action is to display a message box by calling the . "show_matherr" function. | |
| max | any max(any v1, any v2); Returns the maximum of two values Source file: FUN.L | |
| max | any max(any v1, any v2, any v3); Returns the maximum of three values Source file: FUN.L | |
| max | any max(any v1, any v2, any v3, any v4); Returns the maximum of four values Source file: FUN.L | |
| mciGetErrorString | bool mciGetErrorString(unsigned long wError, char * lpstrBuffer, unsigned uLength); Source file: WIN.L | |
| mci_pause_wait | void mci_pause_wait(int milliseconds); Source file: TIMER.L | |
| mciSendString | unsigned long mciSendString(char * lpstrCommand, char * lpstrReturnString, unsigned wReturnLength, unsigned hCallback); Source file: WIN.L | |
| mdy | string mdy(); Returns the current date in the form MM/DD/YY Source file: FUN.L | |
| mdy | string mdy(long time); Returns a date/time in the form MM/DD/YY Source file: FUN.L | |
| mdy_hh_mm | string mdy_hh_mm(); Returns current time in the form MM/DD/YY HH:MM Source file: FUN.L | |
| mdy_hh_mm | string mdy_hh_mm(long time); Returns a time in the form MM/DD/YY HH:MM Source file: FUN.L | |
| mdyyyy | string mdyyyy(); Returns the current date in the form MM/DD/YYYY Source file: FUN.L | |
| mdyyyy | string mdyyyy(long time); Returns a date/time in the form MM/DD/YYYY Source file: FUN.L | |
| mdyyyy_hh_mm | string mdyyyy_hh_mm(); Returns current time in the form MM/DD/YYYY HH:MM Source file: FUN.L | |
| mdyyyy_hh_mm | string mdyyyy_hh_mm(long time); Returns a time in the form MM/DD/YYYY HH:MM Source file: FUN.L | |
| mem_avail | long mem_avail(); Returns the amount of memory available in bytes Source file: FUN.L | |
| memrstr | int memrstr(memory buf, string s); Find a string in a memory buffer searchng backwards Source file: FUN.L . Returns the index of the string or -1 if not found. | |
| memrstr | long memrstr(memory buf, string s, long i); Find a string in a memory buffer starting at an offset and searchng backwards Source file: FUN.L . Returns the index of the string or -1 if not found. | |
| memset | any memset(any dest, int ch, long count); Initialize a block of memory to a specified byte Source file: FUN.L . WARNING! This "low-level", C-style function is not intended for . general use and is not as protected as typical Liana functions. . A limited amount of checking is performed, but it is still . possible for some bogus pointers to get processed and for data . to be accessed beyond the end of the memory block if the count . is too large. | |
| memset | any memset(any dest, long offset, int ch, long count); Initialize a portion of a memory block to a specified byte Source file: FUN.L . WARNING! This "low-level", C-style function is not intended for . general use and is not as protected as typical Liana functions. . A limited amount of checking is performed, but it is still . possible for some bogus pointers to get processed and for data . to be accessed beyond the end of the memory block if the count . or offset are too large. | |
| memstr | int memstr(memory buf, string s); Find a string in a memory buffer Source file: FUN.L . Returns the index of the string or -1 if not found. | |
| memstr | long memstr(memory buf, string s, long i); Find a string in a memory buffer starting at an offset Source file: FUN.L . Returns the index of the string or -1 if not found. | |
| menu_separator | menu_separator menu_separator(); Returns a common "menu separator" Source file: MENU.L . There is no need to instantiate more than one menu_separator . since it has no attributes worth setting. | |
| message | void message(string caption, string text); Display a message in a message box with caption Source file: MSGBOX.L . There will not be an icon. . It will have an "OK" button. | |
| message | void message(string text); Display a message in a message box Source file: MSGBOX.L . There will not be an icon. . It will have an "OK" button. . The application name ("apname" global variable) will be used as . the message box caption. | |
| min | any min(any v1, any v2); Return the minimum of two values. Source file: FUN.L | |
| min | any min(any v1, any v2, any v3); Return the minimum of three values. Source file: FUN.L | |
| min | any min(any v1, any v2, any v3, any v4); Return the minimum of four values. Source file: FUN.L | |
| min_max | any min_max(any v1, any min, any max); Limit a value to a range Source file: FUN.L | |
| mkdir | bool mkdir(string dir); Create a directory Source file: FUN.L . Unlike its C equivalent, this function creates all parent directories . if they do not exist. . Returns true if directory already exists. | |
| month | string month(); Returns the name of the current month Source file: FUN.L . In English, capitalized. | |
| month | string month(long time); Returns the name of the month for a time Source file: FUN.L . In English, capitalized. | |
| month_day_year | string month_day_year(); Returns current date in format "Month DD, YYYY" Source file: FUN.L | |
| month_day_year | string month_day_year(long time); Returns a date/time in format "Month DD, YYYY" Source file: FUN.L | |
| no_default_library | void no_default_library(); Clear the library list (not even default library) Source file: LCL.L | |
| no_yes | bool no_yes(string caption, string text); Display a No/Yes question in a message box with caption Source file: MSGBOX.L . It will use the question mark icon. . It will have "Yes" and "No" buttons which return true and false. . Unlike the "yes_no" function, the "No" button is the default . button which is selected if the user presses the Enter key. | |
| no_yes | bool no_yes(string text); Display a No/Yes question in a message box Source file: MSGBOX.L . It will use the question mark icon. . It will have "Yes" and "No" buttons which return true and false. . Unlike the "yes_no" function, the "No" button is the default . button which is selected if the user presses the Enter key. . The application name ("apname" global variable) will be used as . the message box caption. | |
| no_yes_cancel | any no_yes_cancel(string caption, string text); Display a No/Yes/Cancel question in a message box with caption Source file: MSGBOX.L . It will use the question mark icon. . It will have "Yes", "No", and "Cancel" buttons which return true, . false, and "cancel". . Unlike the "yes_no_cancel" function, the "No" button is the default . button which is selected if the user presses the Enter key. | |
| no_yes_cancel | any no_yes_cancel(string text); Display a No/Yes/Cancel question in a message box Source file: MSGBOX.L . It will use the question mark icon. . It will have "Yes", "No", and "Cancel" buttons which return true, . false, and "cancel". . Unlike the "yes_no_cancel" function, the "No" button is the default . button which is selected if the user presses the Enter key. . The application name ("apname" global variable) will be used as . the message box caption. | |
| num_colors | int num_colors(); Returns number of colors supported by screen Source file: FUN.L . Note: If the screen supports more than 30-bits per pixel, the . result is a real number, otherwise it's an integer. . See Also: bits_per_pixel, num_planes | |
| num_digits | int num_digits(int n); Returns the number of digits in an integer Source file: FUN.L . Uses absolute value for negative number. | |
| num_planes | int num_planes(); Returns the number of "planes" for the display Source file: FUN.L . See Also: bits_per_pixel, num_colors | |
| nyi | void nyi(); Displays an error message box for an unimplemented function Source file: MSGBOX.L . The caller's function name and class will be displayed. . The application name ("apname" global variable) will be used as . the message box caption. | |
| nyi | void nyi(string caption, string text); Displays an error message box with caption for an unimplemented feature Source file: MSGBOX.L | |
| nyi | void nyi(string text); Displays an error message box for an unimplemented feature Source file: MSGBOX.L . The application name ("apname" global variable) will be used as . the message box caption. | |
| object | any object(string class_name, any v); Build an object reference from a class name and value Source file: FUN.L | |
| okay | void okay(string caption, string text); Display a confirmation message in a message box with a caption Source file: MSGBOX.L . The message box will use the question mark icon. . It will have an "OK" button. | |
| okay | void okay(string text); Display a confirmation message in a message box Source file: MSGBOX.L . The message box will use the question mark icon. . It will have an "OK" button. . The application name ("apname" global variable) will be used as . the message box caption. | |
| okay_cancel | bool okay_cancel(string caption, string text); Display a confirmation message in a message box with caption that use can cancel Source file: MSGBOX.L . The message box will use the question mark icon. . It will have "OK" and "Cancel" button. . Returns false if user selects the "Cancel" button. | |
| okay_cancel | bool okay_cancel(string text); Display a confirmation message in a message box that use can cancel Source file: MSGBOX.L . The message box will use the question mark icon. . It will have "OK" and "Cancel" button. . Returns false if user selects the "Cancel" button. . The application name ("apname" global variable) will be used as . the message box caption. | |
| operand_stack_depth | int operand_stack_depth(); Returns the number of intermediate values on the interpreter stack Source file: FUN.L | |
| os | string os(); Returns the operating system name Source file: FUN.L . This is "Windows", "Windows 95", or "Windows NT". . See Also: os_version, dos_version | |
| os_version | string os_version(); Returns the operating system version number (nn.mm) Source file: FUN.L . This is the Windows version number for DOS-based systems . Stores the return value in the os_version global variable. . Stores the numeric value in the os_version_num global variable. . See Also: dos_version, os_version_build | |
| os_version_build | string os_version_build(); Returns the operating system version number with build (nn.mm.bbb) Source file: FUN.L . This is the Windows version number for DOS-based systems . Stores the return value in the os_version_build global variable. . Returns "0.0.0" if there is an error. . See Also: os_version, dos_version | |
| output_opcode_frequency | void output_opcode_frequency(any target); Output opcode frequency summary Source file: INTERP.L . Argument is typically a window or file or any object that has a "put_to" . function and can handle return and newline characters. | |
| palette_changed | void palette_changed(); Callback function called when the system palette is changed Source file: WINDOW.L | |
| parse_arguments | array parse_arguments(array argv, string args); Parse a command-line argument list into an existing array Source file: FUN.L . New arguments are appended to the existing array. . See Also: arg_list, arg_string | |
| parse_arguments | array parse_arguments(string arg_list); Parse a command-line argument list Source file: FUN.L . Returns null if no arguments. . See Also: arg_list, arg_string | |
| parse_color | any parse_color(string color); Parse a text color value Source file: COLOR.L . Empty or "-" means no color. . Use three comma separated integers for RGB. . Otherwise treated as a single character color code. . Strips off optional enclosing quotes. | |
| play_media | bool play_media(string path); Begin playing a media file Source file: MEDIA.L . Returns after starting to play the media but does . not wait till it finishes. Call "wait_media" to . wait till it finishes playing. Alternatively, . call "play_media_wait" to both begin playing the . media file and wait till it finishes. | |
| play_media_wait | bool play_media_wait(string path); Play a media file and wait till it finishes Source file: MEDIA.L | |
| point_x | int point_x(unsigned long p); Returns the X coordinate for a Windows point Source file: FUN.L | |
| point_y | int point_y(unsigned long p); Returns the Y coordinate for a Windows point Source file: FUN.L | |
| pow | real pow(real x, real y); Raise a number to a power Source file: FUN.L | |
| printf | void printf(string format, any args...); Format a string with embedded format codes and output to stdout Source file: FUN.L . The text of the format string is output unchanged except for . embedded format codes which are replaced by the extra arguments . which will be formatted as specified by the format codes. There . is a one-to-one, left to right association of arguments with . format codes. . . Each format code begins with a percent character (%) followed by . a letter code. If you Want to embed a percent character, then . just immediately follow it with a second percent (%%). . . A subset of the C format codes are supported: . . %d - Format as a decimal integer. . %g - Format as a real number . %s - Any string . %c - The first character of a string . %u - Format as an unsigned decimal integer. . %x - Format as a hex indeger . %X - Format as a hex indeger with upper case letters . . In addition to format codes, you may also embed the escape . sequences permitted in any string literal, such as new line (\n), . tab (\t), and carriage return (\r). . . Unlike C, this printf is type-safe and will automatically convert . types as needed (e.g., you can specify an integer for %d or a . real for a %g.) . . You may create your own "stdout" object. All it needs is a . "put_to" member function to process the string to be output. . Store the object in the "stdout" global variable. . . You may also substitute your own formatting function since printf . calls "xprintf" to do the formatting. . . See also: sprintf, fprintf, and xprintf | |
| put_byte | void put_byte(memory buf, long offset, unsigned char value); Stores a byte at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| put_bytes | void put_bytes(memory buf, long offset, long count, memory bytes); Store n bytes at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| put_char | void put_char(memory buf, long offset, unsigned value); Stores a byte at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| put_double | void put_double(memory buf, long offset, double value); Stores a double precision float at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| putenv | any putenv(string apname, string key, any value); Replaces the value of a keyword in WIN.INI for an application Source file: FUN.L | |
| put_int | void put_int(memory buf, long offset, int value); Stores an integer at an offset in a buffer Source file: FUN.L . This is a 16-bit integer for Windows and a 32-bit integer for Win32. . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| put_long | void put_long(memory buf, long offset, long value); Stores a 32-bit integer at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| put_pointer | void put_pointer(memory buf, long offset, char * pointer); Stores a 32-bit pointer at an offset in a buffer Source file: FUN.L . The pointer value is typically a string value returned by the . malloc function. . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| put_short | void put_short(memory buf, long offset, short value); Stores a 16-bit integer at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| put_string | void put_string(memory buf, long offset, string value); Stores a NUL-terminated string at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| put_unsigned | void put_unsigned(memory buf, long offset, unsigned value); Stores an unsigned integer at an offset in a buffer Source file: FUN.L . This is a 16-bit integer for Windows and a 32-bit integer for Win32. . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| put_unsigned_char | void put_unsigned_char(memory buf, long offset, unsigned char value); Stores a byte at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| put_unsigned_long | void put_unsigned_long(memory buf, long offset, unsigned long value); Stores a 32-bit unsigned integer at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| put_unsigned_short | void put_unsigned_short(memory buf, long offset, unsigned short value); Stores a 16-bit unsigned integer at an offset in a buffer Source file: FUN.L . The buffer was allocated either with "malloc" or is a raw 32-bit . integer pointer such as returned by "c_pointer". | |
| radians | real radians(real x); Convert an angle in degrees to radians Source file: FUN.L | |
| rand | int rand(); Generate a random number Source file: FUN.L . It will be in the range 0 to "int_max". | |
| rand | any rand(any min, any max); Generate a random number within a range Source file: FUN.L | |
| realloc | any realloc(any obj, long size); Reallocate a block of memory Source file: FUN.L . Block must have been allocated by "malloc". | |
| reboot_system | bool reboot_system(); Reboot the system Source file: WINDOW.L | |
| regen_app_win_list | bool regen_app_win_list(any obj); Source file: APPWIN.L | |
| remove | bool remove(string path); Delete one or more files Source file: FUN.L . Unlike its C equivalent, it supports wildcards. | |
| remove | string remove(string s, int i); Delete the end of a string starting with ith character Source file: FUN.L | |
| remove | string remove(string s, int i, int n); Delete n characters of string starting with ith character Source file: FUN.L | |
| rename | bool rename(string old_path, string new_path); Source file: FUN.L | |
| replace_text | bool replace_text(window ed); Source file: REPLACET.L | |
| restart_windows | bool restart_windows(); Exit from Windows and restart Windows Source file: WINDOW.L | |
| restart_windows | bool restart_windows(string program); Exit and restart windows and run a program Source file: WINDOW.L | |
| restart_windows | bool restart_windows(string program, string params); Exit and restart windows and run a program with arguments Source file: WINDOW.L | |
| rgb | long rgb(int red, int green, int blue); Combine R, G, and B color components into an RGB value Source file: COLOR.L | |
| rgb | long rgb(string s); Parse a color string and convert to an RGB value. Source file: COLOR.L . The string can be either a single integer RGB value or a sequence . of three integer values representing the R, G, and B values. . For example: . . 8439015 . 128,192,255 | |
| rgb_blue | int rgb_blue(long rgb); Returns the blue component of an RGB value Source file: COLOR.L | |
| rgb_green | int rgb_green(long rgb); Returns the green component of an RGB value Source file: COLOR.L | |
| rgb_red | int rgb_red(long rgb); Returns the red component of an RGB value Source file: COLOR.L | |
| rmdir | bool rmdir(string path); Delete a directory Source file: FUN.L | |
| round | real round(real x); Round a real number Source file: FUN.L | |
| round | real round(real x, int precision); Round a real number to a precision Source file: FUN.L . The precision is the number of decimal digits in the result. . For example, to round away fractional pennies: round (x, 2). | |
| run_macro | any run_macro(string macro); Execute a macro Source file: LCL.L . A macro is a sequence of Liana statements. . Returns the return value of the macro (or null if there is no . return statement) or a special value if there is an error. This . special error value can be checked for by calling the "is_error" . member function for the return value. Returns null if an error . or macro does not execute a "return" statement. | |
| run_macro | any run_macro(string macro, string path); Execute a macro that was read from a file Source file: LCL.L . Same as "run_macro", but includes file name in error messages. . Note: This function does not actually read the file (use "run_macro_file".) | |
| run_macro_file | any run_macro_file(string path); Execute a macro from a file Source file: LCL.L . A macro is a sequence of Liana statements. . Returns null if an error or macro does not execute a "return" . statement. | |
| screen_height | int screen_height(); Returns the height of the screen in pixels Source file: FUN.L | |
| screen_width | int screen_width(); Returns the width of the screen in pixels Source file: FUN.L | |
| set_window_object | void set_window_object(unsigned hWnd, window w); Associates a window object with a Windows handle Source file: WINDOW.L | |
| show_fatal_error | bool show_fatal_error(string msg, int line, string class_name, string function, string path); Display the message concerning a fatal error Source file: INTERP.L . Prompts the user whether to continue. . Returns true if the user wants to continue | |
| show_matherr | void show_matherr(string type, string name, real arg1, real arg2, real retval, int line, string class_name, string function, string path); Source file: INTERP.L | |
| show_mci_error | void show_mci_error(video video, string command, string msg); Source file: VIDEO.L | |
| show_object_browser | void show_object_browser(any obj, string mode); Bring up the Object Browser for an object Source file: BROWSER.L | |
| sin | real sin(real x); Returns the sine of an angle in radians Source file: FUN.L | |
| small_font | font small_font(); Returns the "small" font (e.g., for dialogs) Source file: FONT.L | |
| spawn | unsigned spawn(string path); Spawn an application Source file: FUN.L . Returns either the Windows task handle or an error code < 32. | |
| spawn | unsigned spawn(string path, array args); Spawn an application with arguments Source file: FUN.L . The first argument must be the path of the application . Returns either the Windows task handle or an error code < 32. | |
| spawn_hidden | unsigned spawn_hidden(string path); Spawn an application so it runs hidden Source file: FUN.L . Returns either the Windows task handle or an error code < 32. | |
| spawn_hidden | unsigned spawn_hidden(string path, array args); Spawn an application with arguments so it runs hidden Source file: FUN.L . The first argument must be the path of the application . Returns either the Windows task handle or an error code < 32. | |
| spawn_icon | unsigned spawn_icon(string path); Spawn an application as an icon Source file: FUN.L . Returns either the Windows task handle or an error code < 32. | |
| spawn_icon | unsigned spawn_icon(string path, array args); Spawn an application as an icon with arguments Source file: FUN.L . The first argument must be the path of the application . Returns either the Windows task handle or an error code < 32. | |
| split_path | void split_path(string path, string drive_buf, string dir_buf, string fname_buf, string ext_buf); Source file: DIR.L | |
| sprintf | string sprintf(string format, any args...); Format a string using embedded format codes Source file: FUN.L . See also: rand . See "printf" for formatting details | |
| sqrt | real sqrt(real x); Returns the square root of a number Source file: FUN.L | |
| srand | void srand(unsigned seed); Source file: FUN.L | |
| start_auto_save_timer | void start_auto_save_timer(); Start the Auto Save timer for the text editor Source file: LINEEDIT.L . See also: auto_save:: | |
| stat | stat stat(string path); Source file: FUN.L | |
| step_count | long step_count(); Returns the number of P-codes executed by the interpreter Source file: FUN.L . Each function call counts as 100 steps since this number is used . as a measure of performance and OOP function calls are expensive. | |
| stop_media | void stop_media(); Stop playing the current media file Source file: MEDIA.L . Also closes the device. . See also: play_media | |
| strafter | string strafter(string s, string delimiter); Returns the portion of a string after a delimiter string Source file: FUN.L | |
| strbefore | string strbefore(string s, string delimiter); Returns the portion of a string before a delimiter string Source file: FUN.L | |
| strbegins | bool strbegins(string s, string pat); Returns true if a string begins with a pattern string Source file: FUN.L | |
| strcap | string strcap(string s); Capitalizes a string Source file: FUN.L . First letter of each word is converted to upper case and other . letters are converted to lower case. . . See also: strcase | |
| strcap | string strcap(string s, string use_case); Capitalizes a string based on a "case" Source file: FUN.L . If requested case is "none", string is unchanged. . If requested case is "lower", string as converted to lower case. . If requested case is "upper", string as converted to upper case. . If requested case is "mixed", first letter of each word is . converted to upper case and other letters are converted to . lower case. . . You may "cycle" though the cases by adding 1 to the value . returned by strcase. If strcase returns "lower", adding 1 . gives "lower1" which converts the case to mixed. Adding . 1 to "mixed" gives "mixed1" which converts to upper case. . And adding 1 to "upper" gives "upper1" which converts to . lower case. . . See also: strcase | |
| strcase | string strcase(string s); Returns the "case" of a string Source file: FUN.L . Return values are "none" if no letters, "lower" if no upper case . letters, "upper" if no lower case letters, and "mixed" if some . upper and some lower case. . . See also: strcap | |
| strchcount | long strchcount(string s, string ch); Counts occurrences of a character in a string Source file: FUN.L | |
| strchcount | long strchcount(string s, string ch, long i); Counts occurrences of a character in remainder of a string Source file: FUN.L . Counting starts with the ith character | |
| strchcount | long strchcount(string s, string ch, long i, long n); Counts occurrences of a character in a portion of a string Source file: FUN.L . Counting starts with the ith character and proceeds for n . characters. | |
| strchr | long strchr(string s, string ch); Finds the first occurrence of a character Source file: FUN.L . Returns the character index (0-based) or -1 if no match. | |
| strchr | long strchr(string s, string ch, long i); Finds the next occurrence of a character Source file: FUN.L . Starts search with the ith character. . Returns the character index (0-based) or -1 if no match. | |
| strchr | long strchr(string s, string ch, long i, bool search_forward); Finds the next or previous occurrence of a character Source file: FUN.L . Starts search with the ith character. . If "search_forward" is false, search proceeds back towards the . beginning of the string. . Returns the character index (0-based) or -1 if no match. | |
| strcol | int strcol(string s, int i); Converts a character index to a column using a tad width of 8 Source file: FUN.L . An index of -1 converts to the width of the string if its tabs . were expanded. | |
| strcol | int strcol(string s, int i, int tab_width); Converts a character index to a column given tab width Source file: FUN.L . An index of -1 converts to the width of the string if its tabs . were expanded. | |
| strcolindex | int strcolindex(string s, int i); Convert a column index to character index for tab width of 8 Source file: FUN.L | |
| strcolindex | int strcolindex(string s, int i, int tab_width); Convert a column index to character index given a tab width Source file: FUN.L | |
| strdetab | any strdetab(any s); Expand tabs to spaces (assumes tab width is 8) Source file: FUN.L | |
| strdetab | any strdetab(any s, int tab_width); Expand tabs to spaces given a tab width Source file: FUN.L | |
| strdup | string strdup(string s); Make a copy of a string Source file: FUN.L | |
| strelide | string strelide(string s, int n); Truncate (elide) a string to a given length Source file: FUN.L . Trailing characters are replaced with "...". | |
| string_vector | memory string_vector(any obj); Build a vector of strings from an array-like object Source file: FUN.L . This consists of a vector of far pointers to strings stored . just past the pointers. . Each string will by terminated by a NUL with an extra NUL at the end. . Be sure to call "free_vector" when the string vector is no longer needed. | |
| strinsert | string strinsert(string s, int i, string s1); Inserts a string into another string Source file: FUN.L . The second string is inserted before the ith character of the . first string. | |
| strlen | long strlen(string s); Returns the length of a string Source file: FUN.L | |
| strline | string strline(string s, int i); Returns the line which contains the ith character of a string Source file: FUN.L | |
| strlwr | any strlwr(string s); Returns a copy of a string with upper case changed to lower case Source file: FUN.L | |
| strpad | string strpad(string s, int width); Pad a string to a width with blanks Source file: FUN.L . A positive width pads on the right. . A negative width pads on the left. | |
| strpad | string strpad(string s, int width, string ch); Pad a string to a width with a character Source file: FUN.L . A positive width pads on the right. . A negative width pads on the left. | |
| strpbrk | long strpbrk(string s1, string s2); Find the first occurrence of any character of the second string Source file: FUN.L . Returns the index of the character in the first string or -1 if . not found. | |
| strpbrk | long strpbrk(string s1, string s2, long offset); Find the next occurrence of any character of the second string Source file: FUN.L . Search begins with the ith character of the first string. . Returns the index of the character in the first string or -1 if . not found. | |
| strrchr | long strrchr(string s, string ch); Search for the last occurrence of a character Source file: FUN.L . Returns the index of the character or -1 if not found. | |
| strrchr | long strrchr(string s, string ch, long i); Search for the previous occurrence of a character Source file: FUN.L . Search begins with the ith character and proceeds back towards . the beginning of the string. . Returns the index of the character or -1 if not found. | |
| strrep | string strrep(string s, string pattern); Delete all occurrences of a set of characters Source file: FUN.L . The input string is not modified, a copy is made. | |
| strrep | any strrep(string s, string pattern, string rep); Replace all occurrences of a set of characters with another set Source file: FUN.L . There is a one-to-one correspondence between the characters in . the pattern string and the replacement string. . If the replacement string is shorter than the pattern, . matching characters beyond the length of the replacement string . will be deleted. . Extra characters in the replacement string will be ignored. . The input string is not modified, a copy is made. | |
| strrstr | long strrstr(string s, string pat); Finds the last occurrence of a string Source file: FUN.L . Returns the character index of the first character of the . matching substring or -1 if no match. | |
| strrstr | long strrstr(string s, string pat, long i); Finds the previous occurrence of a string Source file: FUN.L . Returns the character index of the first character of the . matching substring or -1 if no match. . The search starts trying to match the first character of the . pattern string with the ith character of the string. | |
| strrstr | long strrstr(string s, string pat, long i, bool match_case); Finds the previous occurrence of a string with case Source file: FUN.L . Returns the character index of the first character of the . matching substring or -1 if no match. . The search starts trying to match the first character of the . pattern string with the ith character of the string. . A value of false for "match_case" causes a case-insensitive search. | |
| strrstr | long strrstr(string s, string pat, long i, bool match_case, bool match_word); Finds the previous occurrence of a string with case, word match Source file: FUN.L . Returns the character index of the first character of the . matching substring or -1 if no match. . The search starts trying to match the first character of the . pattern string with the ith character of the string. . A value of false for "match_case" causes a case-insensitive search. . A value of true for "match_word" requires that the match not be . immediately preceded or followed by a letter. | |
| strsplit | array strsplit(string s, string delimiter); Split a string into array elements using a delimiter Source file: FUN.L | |
| strstr | long strstr(string s, string pat); Finds the first occurrence of a string Source file: FUN.L . Returns the character index of the first character of the . matching substring or -1 if no match. | |
| strstr | long strstr(string s, string pat, long i); Find the next occurrence of an embedded string Source file: FUN.L . Returns the character index of the first character of the . matching substring or -1 if no match. . The search begins at the ith character of the first argument. | |
| strstr | long strstr(string s, string pat, long i, bool match_case); Find an embedded string with optional case sensitivity Source file: FUN.L . Searches for the next occurrence of the pattern string. . Returns the character index of the first character of the . matching substring or -1 if no match. . The search begins at the ith character of the first argument. . A value of false for "match_case" causes a case-insensitive search. | |
| strstr | long strstr(string s, string pat, long i, bool match_case, bool match_word); Find an embedded string with optional case, word match Source file: FUN.L . Searches for the next occurrence of the pattern string. . Returns the character index of the first character of the . matching substring or -1 if no match. . The search begins at the ith character of the first argument. . A value of false for "match_case" causes a case-insensitive search. . A value of true for "match_word" requires that the match not be . immediately preceded or followed by a letter. | |
| strstr | long strstr(string s, string pat, long i, bool match_case, bool match_word, bool search_forward); Find an embedded string with optional case, word match, and direction Source file: FUN.L . Searches for the next or previous occurrence of the pattern string. . Returns the character index of the first character of the . matching substring or -1 if no match. . The search begins at the ith character of the first argument. . A value of false for "match_case" causes a case-insensitive search. . A value of true for "match_word" requires that the match not be . immediately preceded or followed by a letter. . A value of true for "search_forward" causes searching to go forward, . a value of false causes a search back towards the beginning of the . string (trying to match the first character of the pattern string . with the ith character of the string. | |
| strtrim | string strtrim(string s); Trims a string of trailing white space Source file: FUN.L | |
| strupr | any strupr(string s); Converts lower case letters to upper case Source file: FUN.L | |
| substr | string substr(string s, long i); Returns the remainder of a string starting at ith character Source file: FUN.L | |
| substr | any substr(string s, long i, long n); Returns n characters starting with the ith character Source file: FUN.L | |
| suspend_mci_logging | bool suspend_mci_logging(bool suspend_logging); Source file: VIDEO.L | |
| tan | real tan(real x); Returns the tangent of an angle in radians Source file: FUN.L | |
| terminate_liana | void terminate_liana(); Give application one last shot before termination. Source file: INTERP.L | |
| time | long time(); Returns the current date/time in seconds Source file: FUN.L | |
| time_ms | long time_ms(); Returns the time since application startup in milliseconds Source file: FUN.L | |
| timezone | long timezone(); Returns the current time zone in seconds relative to GMT Source file: FUN.L | |
| title | string title(string path); Returns a standard window title using a file name. Source file: FUN.L | |
| title_file | string title_file(string path); Returns the file name portion of a standard window title for a file Source file: FUN.L . Automatically increments "fw.next_untitled" to derive the "Untitled" . serial number. | |
| title_file | string title_file(string path, int k); Returns the file name portion of a standard window title for a file Source file: FUN.L . "k" is the "Untitled" serial number. | |
| tm_hour | int tm_hour(long time); Returns the hour (0..23) for a date/time Source file: FUN.L | |
| tm_isdst | int tm_isdst(long time); Returns true if daylight savings time is in effect for a date/time Source file: FUN.L | |
| tm_mday | int tm_mday(long time); Returns the day in month (0..30) for a date/time Source file: FUN.L | |
| tm_min | int tm_min(long time); Returns the minute (0..59) for a date/time Source file: FUN.L | |
| tm_mon | int tm_mon(long time); Returns the month (0..11) for a date/time Source file: FUN.L | |
| tm_sec | int tm_sec(long time); Returns the seconds (0..59) for a date/time Source file: FUN.L | |
| tm_wday | int tm_wday(long time); Returns the day in week (0..6) for a date/time Source file: FUN.L | |
| tm_yday | int tm_yday(long time); Returns the day in year (0..365) for a date/time Source file: FUN.L | |
| tm_year | int tm_year(long time); Returns the year (1900...) for a date/time Source file: FUN.L | |
| trunc | real trunc(real x); Returns the integer portion of a real number. Source file: FUN.L . Converts its argument to real first. . See Also: ceil, floor, round | |
| trunc | real trunc(real x, int precision); Truncates a real number to a precision Source file: FUN.L . For example, trunc (1.237, 2) returns 1.23. . See Also: ceil, floor, round | |
| tzname | string tzname(int i); Returns the time zone names Source file: FUN.L . Argument is 0 or 1, 0 means the standard time name and 1 means the . daylight savings time name. | |
| ultoa | string ultoa(unsigned long value); Convert an unsigned long 32-bit integer to ASCII text Source file: FUN.L | |
| ultoa | string ultoa(unsigned long value, int radix); Convert an unsigned long 32-bit integer to ASCII text in some base Source file: FUN.L | |
| unmap_drive | bool unmap_drive(string drive); Unmap a drive letter from its network path Source file: FUN.L . See Also: map_drive, get_drive_mapping | |
| utime | bool utime(string path, long mtime); Set the modification time for a file Source file: FUN.L | |
| vector_strings | array vector_strings(memory buf); Build an array from a vector of strings Source file: FUN.L . Each string is NUL terminated with an extra NUL at the end. | |
| view_help | bool view_help(string help_path); View a Windows Help file Source file: MENU.L | |
| volume_label | string volume_label(string path); Returns the label for a volume (drive) Source file: FUN.L | |
| wait | void wait(int milliseconds); Source file: TIMER.L | |
| wait_media | void wait_media(); Wait for the current media file to finish playing Source file: MEDIA.L . Called only after calling "play_media". . Also closes the device. . Note: No application input will be processed. Specifically, . keyboard and mouse input will be deferred until after the . media wait completes. . See also: play_media_wait | |
| wait_silently | void wait_silently(int milliseconds); Source file: TIMER.L | |
| wait_until_task_terminates | void wait_until_task_terminates(unsigned handle); Wait until a task terminates Source file: FUN.L . Checks task status every 500 milliseconds. | |
| wait_until_task_terminates | void wait_until_task_terminates(unsigned handle, int interval); Wait until a task terminates Source file: FUN.L . Checks task status at specified interval (milliseconds.) | |
| warn | void warn(string caption, string text); Display a warning message in a message box with caption Source file: MSGBOX.L . The message box will use the exclamation point icon. . It will have an "OK". | |
| warn | void warn(string text); Display a warning message in a message box Source file: MSGBOX.L . The message box will use the exclamation point icon. . It will have an "OK". . The application name ("apname" global variable) will be used as . the message box caption. | |
| win_api_init | void win_api_init(); Initialize globals needed for using the Windows API Source file: WINDOW.L . This is called automatically when the first window is created. | |
| window | window window(); Create and show a window Source file: WINDOW.L . Returns the window . Window will be an instance of class "app_window". | |
| window | window window(string title); Create and show a window with a title Source file: WINDOW.L . Returns the window . Window will be an instance of class "app_window". | |
| window_font | font window_font(); Returns the default window font Source file: FONT.L | |
| window_object | window window_object(unsigned hWnd); Returns the window object associated with a Windows handle Source file: WINDOW.L | |
| window_wait | void window_wait(); Wait till user closes last window for this application Source file: WINDOW.L . Assumes either the "fw" or "w" global variables are set to refer . to a window. | |
| workspace_used | long workspace_used(); Returns the current application workspace size in bytes Source file: FUN.L | |
| write_file | bool write_file(string path, memory buf); Writes a memory buffer to a text file Source file: FILE.L . Returns true if successful and false if unsuccessful. . The "file_error_code" global variable will be set to indicate . any failure: null for success, "create", "write", or "close". | |
| write_file_with_backup | bool write_file_with_backup(string path, memory buf); Write a buffer to a text file and backup the old file. Source file: FILE.L . If the file already exists, it will be renamed to the same name . but with the extension ".BAK". . The actual operation sequence is: output to file.TMP, delete . any existing file.BAK, rename file to file.BAK, rename file.TMP . to full file name. This sequence guarantees that the old file . will not get mangled if their is an error outputting the new file. . Special note: If the target file extension is ".TMP", then the . temp file will use the extension ".TM1". . The "file_error_code" global variable will be set to indicate . any failure: null for success, "create", "get_lines, "write", . "close", "rename", "remove_backup", or "rename_backup". | |
| write_lines | bool write_lines(string path, array lines); Output an array of lines of text to a file Source file: FILE.L . Line terminators (CRLF) will be added. . The "file_error_code" global variable will be set to indicate . any failure: null for success, "create", "get_lines, "write", . or "close". | |
| write_lines | bool write_lines(string path, array lines, bool partial); Output an array of lines of text to a file with optional last terminator Source file: FILE.L . Line terminators (CRLF) will be added, except for the last line . if "partial" is true. . The "file_error_code" global variable will be set to indicate . any failure: null for success, "create", "get_lines, "write", . or "close". | |
| xprintf | string xprintf(string format, array args); Format a string using embedded format codes and an array of values Source file: FUN.L . See "printf" for formatting details . See also: sprintf | |
| yes_no | bool yes_no(string caption, string text); Display Yes/No question in a message box with a caption Source file: MSGBOX.L . It will use the question mark icon. . It will have "Yes" and "No" buttons which return true and false. . The "Yes" button is the default if the user presses the Enter key. | |
| yes_no | bool yes_no(string text); Display Yes/No question in a message box Source file: MSGBOX.L . It will use the question mark icon. . It will have "Yes" and "No" buttons which return true and false. . The "Yes" button is the default if the user presses the Enter key. . The application name ("apname" global variable) will be used as . the message box caption. | |
| yes_no_cancel | any yes_no_cancel(string caption, string text); Display Yes/No/Cancel question in a message box with a caption Source file: MSGBOX.L . It will use the question mark icon. . It will have "Yes", "No", and "Cancel" buttons which return true, . false, and "cancel". . The "Yes" button is the default if the user presses the Enter key. | |
| yes_no_cancel | any yes_no_cancel(string text); Display Yes/No/Cancel question in a message box Source file: MSGBOX.L . It will use the question mark icon. . It will have "Yes", "No", and "Cancel" buttons which return true, . false, and "cancel". . The "Yes" button is the default if the user presses the Enter key. . The application name ("apname" global variable) will be used as . the message box caption. | |
| yield | bool yield(); Allow other apps to run and Windows messages to be processed Source file: FUN.L . This is equivalent to calling "yield" with a mode of 0. | |
| yield | bool yield(int mode); Allow other apps to run and Windows messages to be processed Source file: FUN.L . Modes: . . 0 = Use PeekMessage until no more messages. . 1 = Use GetMessage to wait until a message, then revert to mode 0. . 2 = Use GetMessage until WM_QUIT received. . 3 = Use GetMessage to wait for a message and then process . that one message and return. | |
John Elkins (john@vermontdatabase.com) 8-Oct-2000