User Tools

Site Tools


lara:docs:sheet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lara:docs:sheet [2017/11/04 19:00]
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 194: Line 198:
 var optimizer = new OptimizeFunctions(functions,​ optimizations);​ var optimizer = new OptimizeFunctions(functions,​ optimizations);​
  
-call optimizer();​+call optimizer(); ​// or optimizer.call()
  
 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 ====
lara/docs/sheet.1509818414.txt.gz · Last modified: 2019/09/22 15:46 (external edit)