This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lara:docs:sheet [2018/01/30 14:20] joaobispo |
lara:docs:sheet [2019/09/22 15:47] (current) |
||
---|---|---|---|
Line 183: | Line 183: | ||
<code lara> | <code lara> | ||
- | call optimizer: OptimizeFunctions(functions, optimizations); | + | // Current syntax |
+ | var optimizer = call OptimizeFunctions(functions, optimizations); | ||
+ | |||
+ | // Previous syntax | ||
+ | call optimizer : OptimizeFunctions(functions, optimizations); | ||
var changedFuncs = optimizer.optFuncs; | var changedFuncs = optimizer.optFuncs; | ||
Line 238: | Line 242: | ||
$loop.exec tile(8); // performed on the same loop as above | $loop.exec tile(8); // performed on the same loop as above | ||
end | end | ||
+ | </code> | ||
+ | |||
+ | |||
+ | If the action returns a result, we can use the following syntax: | ||
+ | |||
+ | <code lara> | ||
+ | var result = $jp.exec <action_name>; | ||
+ | </code> | ||
+ | |||
+ | If 'result' is a variable that already exists, 'var' can be omitted: | ||
+ | |||
+ | <code lara> | ||
+ | result = $jp.exec <action_name>; | ||
+ | </code> | ||
+ | |||
+ | The keyword '.exec' can be omitted if you prefix the name of the action with the target join point, and add parenthesis: | ||
+ | |||
+ | <code lara> | ||
+ | result = $jp.<action_name>(); | ||
</code> | </code> | ||
Line 327: | Line 350: | ||
</code> | </code> | ||
+ | Or you can also use the **match** boolean operator ( **~=** ): | ||
+ | |||
+ | <code lara> | ||
+ | |||
+ | 'aaaa' ~= /a*/ // Returns true | ||
+ | |||
+ | </code> | ||
==== Importing LARA Files ==== | ==== Importing LARA Files ==== |