List of available functions

left (inscription, max_length, suffix)

Returns the text "inscription" whose length is not longer than "max_length". Otherwise, it returns the initial ("max_length" - inscription length "suffix") signs of the text "inscription". Example:

left("this is a long inscription", 10, "...") returns the following text "this is..."

digits (number, amount_of_significant_numbers)

Returns the first numeric parameter "number" with the precision determined by the second parameter: "amount_of_significant_numbers". Example:

Introducing the following digits(1/6, 4) results in the following number: 0.1667

valid (expression)

In general, a text (that may take the specific form of a number) or the so called error (failure) is the value of any "expression". An error may be due to the impossibility of calling up a function (this is a real error), or the function answers the call, but it is designed to return an error message (this is called a failure). An error/failure has the property of returning an error/failure any time an operation is carried out on this specific value. The function called "valid" provides the only possibility of changing error/failure into an empty text. Example:

"steel weight = " . valid(@beam("steel","kg") . "kg")

The method @beam("steel", "kg"), even if called up properly, will never return a zero value, for such value would not be interesting enough. Therefore, in this case the method ends in a failure. If the "valid" function were not used in the above expression, we would not receive any text on the figure (which seems to make sense in this situation). In the above example, the use of the "valid" function in the situation of failure returns the text "steel weight = ".

var (name_of_ROBOT_variable)

The function returns the value of an internal variable used by Robot. An extensive repertoire of these variables can be viewed by opening the Page Setup dialog box (Parameter tab). Examples:

var("PROJECT_NAME") returns the name of the currently-opened project

var("PAGE_NUMBER") returns the number of the first page of a document (a series of figures adding up to a single document)

pageno ()

The function returns the page number (counted from zero) of a series of figures that add up to a single document. Example:

"Page " . (1+pageno()) . "/" . numpages()

If the document contains three pages of figures, then, the following pages will containg the following texts

"Page 1/3"

"Page 2/3"

"Page 3/3"

numpages()

The function returns the number of pages that add up to a single document. Example:

See the example of use of the pageno() function.