Hardware manual
Impact Reference Guide Commands and Functions M-Q
5-21 Datalogic Automation Inc.
x = LOG(2.72) yields x = 1.000632
LOG10()
This function calculates the log of the argument. If the argument is less than or equal to zero, the result is
undef. Example:
x = LOG10(1000) yields x = 3
LTRIM()
This function removes any existing spaces from the leftmost part of a string. Example:
var_string = LTRIM (" This") yields var_string = This
Commands and Functions M-Q
MID()
The syntax of this function is
MID (string, start, [len])
The first argument is a string. The second argument indicates where to start the string extraction. The third
(optional) argument indicates how many characters to extract. If the third argument is omitted, the entire
string is extracted. In this example, the string "middle" is assigned to the variable var_string. Example:
var_string = MID("The middle string",5,6) yields
var_string = middle
MINUTE()
This function converts the real argument to a minute value. If there is no argument, it returns the current
minute (in local Impact device time). Example:
thisminute = MINUTE yields thisminute = 54
MKDIR
(CPM Only) This function creates a directory from a string expression. In this example, the directory "mydi-
rectory" is created in the current directory.
mkdir "/mydirectory"
MOD
Note: The Basic tool does not use this function. Use the % (modulus) operator instead. See “Expressions” on
page 5-4.
MONTH
This function converts the real argument to a month value. If there is no argument, it returns the current
month (in local Impact device time). Example:
thismonth = MONTH yields thismonth = 2