<-- back to the index of Rosetta examples

hello world (text, log)

Create a new action hello() that prints "Hello world!" in the message log.

Example implementations

awk | fl | js | lua | pl | py | rb | sh | stt | tcl

Explanation, step by step

Create a function hello that will be registered as an action. The name of the action and the function is always the same. Action names shall be lowercase.

When the action is called, use message to append a log message.

In the "main" section of the script, register the action using fgw_func_reg().