Previous topic

3. Overview XYZ-Datasets

Next topic

2. Overview Mathematic

1. Overview Programming¶

Datatype conversions
format_number format_number converts a number to a string. The decimal character and the thousands separator can be specified.
ltostr ltostr converts a real matrix of integers to a string matrix of specified base. Base must be in the range 2 to 36.
smprintf smprintf formats a double or string matrix and returns the data as a scalar string or string matrix.
sprintf sprintf returns data in formatted form as a string.
strtod strtod converts a string matrix to a double-precision matrix.
strtol strtol converts a string matrix to a long-integer value.
Variant Matrices
vcast vcast converts a variant matrix to a real matrix, string matrix or a complex matrix.
vconvert vconvert converts a real-, string- or complex-matrix into a variant matrix.
vmatrix vmatrix creates a variant matrix. Each element is set to zero.
vtype vtype returns the type matrix of a variant matrix.
Data types
finite finite checks if the argument is 0/0 or 1/0.
iscolvector iscolvector checks if its argument is a column vector.
iscomplex iscomplex checks if its argument is a complex scalar or complex matrix.
isinf isinf checks if its argument is in the range -INF ... INF.
ismatrix ismatrix checks if the argument is a matrix of any type
isnan isnan checks if the argument is not a number (NaN). For example 0/0.
isrowvector isrowvector checks if its argument is a row vector.
isscalar isscalar checks if its argument is a scalar value.
len len returns the number of elements of its parameter (product from rows and columns).
nc The nc (Number of Columns) function returns the number of columns of its parameter.
nr nr (Number of Rows) returns the number of rows of its parameter.
size size returns the size of its argument.
type type returns the type of its argument.
int int returns the 32-bit integer part of a real number.
ActiveX
ConvertToVariant Is replaced by vconvert.
CreateObject CreateObject creates a new COM-Object.
CreateObjectEmbedded CreateObjectEmbedded creates an object that can be embedded into a UniPlot document page.
Document.Application
app = Document.Application
Document.Handle Document.Handle returns the handle of a embedded UniPlot document.
GetObject GetObject returns a reference to an embedded OLE object or a reference to an application instance.
UniPlot.Call The UniPlot.Call method can be used to invoke a UniPlot function from another program (ActiveX-Controllern).
UniPlot.Call2 The UniPlot.Call2 method can be used to invoke a UniPlot function from a different process (ActiveX-Controllern).
UniPlot.Caption
UniPlot.Caption = ssTitle
UniPlot.Height This property sets the UniPlot window height in pixel.
UniPlot.Left This property sets the UniPlot window left position in pixel.
UniPlot.Top This property sets the UniPlot window top position in pixel.
UniPlot.Visible This property can be used to hide or display the UniPlot window.
UniPlot.Width This property sets the UniPlot window width in pixel.
UniScript.Call The UniScript.Call method can be used to invoke a UniScript function from another program (ActiveX-Controllern).
UniScript.Call2
ret = UniScript.Call2(ssFuncName, arg1, ...)
VariantConvert Is replaced by vcast.
VariantGetType Is replaced by vtype.
Symbol table
LibMain A UniScript library (.ICL) can have one function with the name LibMain. This function will be called directly after loading the library.
RegisterFunction RegisterFunction registers a function from a dynamic link library (DLL) to the UniScript symbol table. After a function is registered, the function can be called directly by UniScript.
alias alias gives a meaningful name to a constant in the program.
clear clear removes a variable or a function from memory.
eval eval evaluates the string given as UniScript code.
eval_file eval_file loads a file with UniScript program code.
evalp evalp evaluates UniScript program code.
evalp_file evalp_file loads a file with UniScript program code.
get_prototype get_prototype returns the prototype string of a UniScript function.
nmaxargs nmaxargs returns the number of function arguments and return values.
saveiclib saveiclib saves all loaded UniScript functions in an UniScript Library file.
source source returns the file name in which the function is located.
stack stack returns the current function name as well as the function name of the calling functions.
symbols symbols returns the names and the sizes of variables and functions.
what what displays the names of the loaded UniScript functions in the command window.
who who displays the names of the global variables in the command window.
whos whos displays information about global variables.The variable name is displayed in the first column. The second column contains the variable type (real, complex, string). The third and forth columns display the number of the variable’s rows and columns. The fifth column contains the variable size in bytes.
Misc
GetWindowsVersion GetWindowsVersion returns information about the windows version.
IpwInfo IpwInfo returns the number of streams and the total size of all streams of an IPW or IPZ file.
IsWin64 IsWin64 checks, if a 64-Bit Windows version is installed.
ShellExecute ShellExecute opens a file with a program which is registered for the file type.
exptok exptok splits a simple arithmetic expression into tokens.
getargs getargs returns a vector of the arguments passed to UniScript. This function is especily useful for UniScript us.exe.
system system creates a new process.
us_lock us_lock locks the Windows message loop while an UniScript function is executed.
call
config config sets and retrieves the UniScript configuration.
diary diary opens and closes a file in which all input and output of the command window will be written.
error error prints an error message into the command window and terminates the execution of the running program.
format format sets the output format for the print command.
nargsin nargsin returns the number of arguments a function was called with.
nargsout nargsout returns the number of return values a function was called with.
system system creates a new process.
version version returns the version string or version number of UniPlot.
find The find function finds the indices of all matrix elements which do not equal 0.
findfirst findfirst finds the index of the first element that is not 0.
all all checks if all elements of a vector or matrix are other than zero (0).
any any checks if any elements of a vector or matrix are zero.
Debugging
DebugBreak DebugBreak sets a break point. The program will stop execution at the function call interrupted.
get_prototype get_prototype returns the prototype string of a UniScript function.
print The print command prints the data into the command window
profiler_start profiler_start starts the profiler. The profiler can be used for analyzing the run-time behavior and performance of programs.
profiler_stop profiler_stop stops the profiler that has been started with the profiler_start function. The profiler can be used for analyzing the run-time behavior and performance of programs.
source source returns the file name in which the function is located.
stack stack returns the current function name as well as the function name of the calling functions.
i18
s _s returns a translated string for an English string. If a translation is not available the function returns the English string. So far the only available language is German. A Japanese translation will soon be available.
get_language get_language returns the language used to display menus, dialogs and messages.

1.1. Overview Bit Functions¶

Bit Functions
bit_and bit_and performs the logical AND operation.
bit_get bit_get returns a bit value.
bit_lshift bit_lshift shifts the bits left.
bit_not bit_not performs logical negation on each bit.
bit_or bit_or performs the logical inclusive OR operation.
bit_rshift bit_rshift shifts the bits right.
bit_set bit_set sets the bit position nBit of m to 0 (off) or 1 (on).
bit_xor bit_xor performs a logical exclusive OR operation.

id-532163