Skip to content
cl4cnam edited this page Nov 18, 2023 · 5 revisions

FuncSug syntax is similar to that of Python, with a few differences:

  • You have to declare all variables: var myVariable
  • To do an assignment: myVariable := myValue
  • Test of equality is made with a single =: if myFirstValue = mySecondValue
  • Booleans are true and false
  • All indentations are made of one tab per indent
  • All block can be labeled with @myLabel
     while true: @myLabel
     	...
  • New syntax for parallel branch:
     parallel ||
     	...
     ||
     	...
  • You can include JavaScript snippet with 'js' block:
     js (var1,...,varN):
     	JavaScript_instruction
     	...
     	JavaScript_instruction
    var1,...,varN are variables that you want to transfer from FuncSug to JavaScript
    or
     myVariable := js (var1,...,varN):
     	JavaScript_instruction
     	...
     	JavaScript_instruction
     	return JavaScript_expression