Howto:Write simple scripts in Nasal: Difference between revisions

Jump to navigation Jump to search
m
var should also be used when a function object is assigned to a variable, otherwise collisions with module names can happen
mNo edit summary
m (var should also be used when a function object is assigned to a variable, otherwise collisions with module names can happen)
Line 15: Line 15:
Now, open our function;
Now, open our function;


<pre>convertTemp = func{</pre>
<pre>var convertTemp = func{</pre>


What we need to do first is to read in the engine temperature (in degF) from the relevant place in the property tree.  We'll create a local variable for that;
What we need to do first is to read in the engine temperature (in degF) from the relevant place in the property tree.  We'll create a local variable for that;

Navigation menu