Algorithmatic Object

The Algorithmatic Object is probably the most important (and only unique?) feature in Algorithmatic. It allows the loading and execution of external algorithms (i.e. algorithms submitted by other users) from within your code. The Algorithmatic Object is an excellent tool for experimenting.

Restrictions

In order to make your algorithm callable by others, you must follow the guide lines stated in Algorithmatic's Programming Style. This basically boils down to:
  • Always have an Execute function
  • Execute function must contain all and only your algorithm logic. The Execute function must also contain other helper functions, as nested functions.
  • Never use the Screen objects inside the Execute function. Your function should take input and return output. Never prints.
  • Don't include validation inside the Execute function. Validation should be done outside (before) calling Execute.
  • Your algorithm should be appropriately tagged and named

See Algorithmatic's Programming Style for details.

Usage

From the editor, type `Algorithmatic` followed by a dot (.)
This will connect to algorithmatic.com and load all the available tags in the auto complete list, select a tag using you keyboard arrows insert a dot (.)
Now all the algorithms under the specified tag are listed, same way you should select an algorithm and then a version.
Finally, the Execute function of that algorithm will be parsed and you will be able to pass input to it and receive output.
updated 21 months and one week ago by guest