Algosim documentation: object

object

Returns the value of a variable.

Syntax

Description

If X is a variable (or s is a string containing the name of a variable), then object(X) (or object(s)) returns the value of the variable.

Very rarely is this function needed; to obtain the value of X, just write X. If this function is useful, it is probably because it enables accessing a variable’s value using a string with the variable’s name.

Examples

object(π)
3.14159265359	(=π)
x ≔ object(InputBox("Please enter the symbol for a mathematical constant:"));
MessageBox("Its square is " + x^2 + ".")
OK

See also