1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> pcb-rnd rosetta hello world (text, log) </title>
<meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
</head>
<body>
<!-- ******* DO NOT EDIT THIS FILE, it is generated by rosetta_genpages.sh ******* -->
<-- back to the <a href="../index.html">index of Rosetta examples</a>
<h1>hello world (text, log)</h1>
Create a new action hello() that prints "Hello world!" in the message log.
<H2> Example implementations </H2>
<a href="ex.awk">awk</a>
|
<a href="ex.fl">fl</a>
|
<a href="ex.js">js</a>
|
<a href="ex.lua">lua</a>
|
<a href="ex.pl">pl</a>
|
<a href="ex.py">py</a>
|
<a href="ex.rb">rb</a>
|
<a href="ex.sh">sh</a>
|
<a href="ex.stt">stt</a>
|
<a href="ex.tcl">tcl</a>
<h2> Explanation, step by step </h2>
Create a function
<i>hello</i>
that will be registered as an action. The name of the action and the function is always the same. Action names shall be lowercase.
<p> When the action is called, use
<i>message</i>
to append a log message.
<p> In the "main" section of the script, register the action using fgw_func_reg().
</body>
</html>
|