| %% |
Character % |
| %<def_name> |
Converts to <def_value>. |
| %'<def_name> |
Converts to <def_value>. |
| %~<def_name>~ |
Converts to <def_value>, the conversion will be carried out only once, therefore can be applied to a symbol with a value containing the "%" character. |
| %for_index_1 |
Index of value currently set in for-variable in the range of 1..{number of values in the list}; (if from_down is used, the value is decremented in range {number of values in the list}..1); the symbol is available only for latest for command. |
| %for_index_0 |
The same as with for_index within the range 0..<number of items in the list>-1. |
| %list_size(<def_name>) |
A number of list elements, no spaces between the quotes; <def_name> has to be a variable, it must not be a different macro; if <def_name> is not defined, zero will be returned; I recommend using the %if defined() test instead of %if list_size()>'0'. |
| %str_length(<par>) |
String length, i.e. string character number, <par> is <string> or <def_name>. |
| %str_pos(<par-sub>,<par-str>) |
The first string position within the second string, 0 position starting with 1 if sub-string does not exist and otherwise, case-sensitive, <par> is <string> or <def_name>. |
| %uppercase(<par>) |
Converts the string (all characters) to upper cases, <par> is <string> or <def_name>. |
| %lowercase(<par>) |
Converts the string (all characters) to lower cases, <par> is <string> or <def_name> |
| %get_index0(<value>,<def_name>) |
Returns an index of a list value (numbered from 0); if the list does not contain the value, -1 will be returned; the list has to be defined. |
| %get_index1(<value>,<def_name>) |
Returns an index of a list value (numbered from 1); if the list does not contain the value, 1will be returned; the list has to be defined. |
| %short_path(xx) |
Converts the absolute path (or file name as well) to a short path for 16-bit applications. The parameter is a macro or text within parentheses. The path (or file) requested has to exist. |
%file_exist(xx) |
{deprecated} %prj/pex_file_exists() should be used instead; returns yes or no depending on existence of the specified file on the disk; the xx parameter should be the absolute path (in Eclipse it must be Processor Expert system subdirectory) and file name, or a relative path with respect to the project directory; the function will not consider whether the file is created in course of the generation process (all generated files are saved in the target directory only after all files have been generated successfully) |
| %prj_file_exists(relpath) |
Returns yes or no depending on existence of the specified file on the disk; the relpath parameter should be relative path with respect to the project directory; the function will not consider whether the file is created in course of the generation process (all generated files are saved in the target directory only after all files have been generated successfully). |
| %pex_file_exists(relpath) |
Returns yes or no depending on existence of the specified file on the disk; the relpath parameter should be relative path from Processor Expert data directory (system directory or user components directory); the function ignores files located in packages, returns only files on the disk. |
| %sys_file_exists(relpath) |
Returns yes or no depending on existence of the specified system file on the disk or in the package; the relpath parameter should be relative path from Processor Expert data directory (system directory or user components directory). |
| %get_file_list(<filetype>,<def_list>,<filemask>) |
Retrieves the list of files on the disk (optionally also sub-directories) with specified mask on the disk and returns number of found files (number of items in the list). <filetype> can be FILES to retrieve list of files or FILES_DIRS to retrieve also
list of sub-directories. <def_list> is identifier of new list, that shall be created by the function, the symbol may not exist, the list will be defined only if at least one file is found and will contain absolute paths. <filemask> is absolute path and specification of file-mask, wildcards are not supported in path, however they may be used in file-mask (use * to list all files), file-mask may additionally specify *\ prefix to proceed all sub-directories non-recursively or
**\ prefix to proceed all sub-directories recursively; the file-mask may be finished by \. to return names of the sub-directories; the function provides direct file-access to the files on the disk, it does not support files in packages, and does not support Eclipse file-system, so it shall not be used to search files in the project. Example: %:num=%get_file_list(FILES,FileList,c:\Users\*.pe), %:num=%get_file_list(FILES,FileList,c:\Users\*\*.pe),
%:num=%get_file_list(FILES,FileList,c:\Users\**\*.pe),
%:num=%get_file_list(FILES_DIRS,FileList,c:\Users\**\.) |
| %get_prj_file_list(<filetype> <def_list> <filemask>) |
Same as get_file_list, but works with Eclipse project files (including hidden files – name starting with “.”); the function works with Eclipse directory separator “/” independent on operating system;
|
| %get_prj_file_location(<fileName>) |
returns source file (absolute path) for linked project file; returns empty string if the project file not found or it is not linked; |
| %html_link(<xx>) |
Converts the directory to an HTML link, the double characters (< and >) to enclose the parameter will be necessary due to the directory name containing a bracket character. |
| %sinus(<value>) |
Calculates sinus. |
| %round(<value>[,<prec>]) |
Rounds a real number to specified number of decimals (range 0-9), if the number of decimals is not specified, rounding to integers will be performed; serves for formatting - i.e. results may include a number with specified number of decimals even in the case there are nulls at the end, for example, %round(1.5)=2, %round(1.5,2)=1.50. |
| %msg(<id>,<text>) |
Displays a dialogue with the relevant text (in which the \n sequence will be replaced by the end of line); id presents one of the following dialogue types (buttons in brackets are displayed behind each description): INFO - Information (OK), YN_CNFRM - Prompt/confirmation (Yes, No), YNC_CNFRM - Prompt/confirmation (Yes, No, Cancel), YN_CNFRM_N - As with YN_CNFRM, but the default button will be No, YNC_CNFRM_N - As with YNC_CNFRM, but the default button will be No, WARN - Warning (OK), ERROR - Error (OK), C_ERROR - Error (Cancel), INTERNAL_ERROR - PE internal error (OK); the function will result in a button, which was pressed by the user or Cancel. |
| %makeIdentifier(<text>) |
A macro function to convert the string characters to identifiers, replacing unsupported characters by an underscore; have on mind: the function does not check if the first character is non numeric. |
| %getCurrentTime() |
Returns current time and date in the format as per Windows settings. |
| %toAscii(<number>) |
Converts an 8-bit positive integer to an ASCII character; if that number is outside the range of characters that can be displayed, a HEX value in the format XX will be returned. |
| %EXPR(<expression>) |
Evaluates the expression and returns its value. |
| %createProjectItem(<itemtype>,<params>[,EnableInAllConfigurations]) |
Creates item for projects of the specified types; <itemtype> can be:
|
| %addAllPeripheralInitComponents() |
Adds peripheral initialization components for all peripherals on the selected target processor; if supported adds also PinSettings component; returns number of added components; the function is designed to be used by new project wizard. |
| %getTargetFileName() |
Returns file name with extension (without directory) of currently selected output file; If no output file selected or event or %INITIALIZATION or %THREAD is selected, returns empty string. |
| %convertPathToOsSpecificFormat(<path>) |
Converts path to OS-specific directories delimiters, <path> is <string> or <def_name>. Processor Expert uses backslash as default path delimiter, this function can format output path to be compatible with operating system ,where Processor Expert is running; this function is supported only in PE Java. |
| %convertListToString(<def_name>,<string>) |
Converts list to string, first parameter is name of existing list, second parameter is string used as a delimiter of list values (can be empty string); all list items are added into string delimited by specified delimiter; the function can be used to generate list content to output or pass the list as %launchExt parameter. |
| %[<i>,<def_list>] |
Returns a list item no. i, where items are numbered from 1, if the index is out of range, an empty string will be returned, def_list has to exist. |
| %#<srcf><dstf>[-]<number> |
Converts an integer (-0x7FFFFFFF..0xFFFFFFFF) from a specified into the requested format: |
| <srcf> |
''(if not specified) - decimal number, ' d ' - decimal number,
' 2 ' - binary number, ' L ' - non-sign 32-bit number,
' H ' - hex number, |
| <dstf> |
' h ' - high-level language format ' d ' - decimal number
' a ' - assembler format - data ' aa ' - assembler format - address
' ab ' - assembler format - binary data ' B ' - binary number (without a prefix and extension)
|
| %#R<number> |
Real number formatting. |