Skip to content
clemahieu edited this page Mar 19, 2013 · 1 revision

Example 1

function example-1  
[]  :(Takes no arguments:)  
[]  :(Does nothing:)  
[ [] ]  :(Returns no data:)  

Example 2

function example-2
[int32 parameter-1]  :(Takes an integer 32 bits wide as an argument:)  
[]  
[ [] ]  

Example 3

function example-3  
[int8 parameter-1]  
[  
  let result-1 [parameter-1]  :(Labels parameter-1 as result-1.:)
      :(There is absolutely no difference between using the identifier result-1 or parameter-1 as a result:)  
]  
[ [result-1] ]  

Example 4

function example-4  
[int1 parameter-1]  
[  
  let result-false result-true [ [if parameter-1] ]  :(The instruction `if' returns two branches.:)
      :(Branches are now labeled `result-false' and `result-true':)  
]  
[ [result-false][result-true] ] :(example-4 returns two possible ways:)
Clone this wiki locally