address

Syntax address (value)

Params value is the object whose datatype you wish to coerce to be a valid Frontier Object Database address.

Action Coerces the string into an address intended to be used with the Frontier Object Database.

Returns The address value if the coercion is successful (that is, the string was successfully converted to a form that can be used to address the Frontier Object database.) This is not a guarantee, however, that the address exists in the database.

Examples address ("examples.readMe")

   » @examples.readMe

address ("people.XYZ")

   » @people.XYZ // even though there is no such table entry at this time

address ("examples.age")^

   » 36

adr = address ("examples.foo");
msg (adr^)
This example produces an error message for the second statement because "foo" has not yet been defined. If we had not included the second statement, Frontier would have returned @examples.foo, as described above.

if dialog.ask ("Address of cell to edit?", @s) {edit (address (s))}
Here we prompt the user to give us a cell address. The value returned by dialog.ask is a string, so we have to coerce it to an address that the edit verb will understand.

Errors If you supply a number or some other type of data that Frontier could interpret as a string but which does not equate to a meaningful address, Frontier returns "Can't coerce the value to an address."

Notes This is a seldom-used verb. Generally you will use the @ operator to reference an object's address. This verb is only needed when you have a value you wish to coerce into being an address.

Although the address verb will take any datatype as an argument, it will almost always make sense only when used with a string that can be resolved into an address in the Frontier Object Database.

See Also defined

Discuss