Tintware Documentation : Tint Programming Language : Tint Reference : Procedures : Procedure ExamplesProcedure ExamplesOnce a procedure is defined, it can be called using an active #( ) or passive ##( ) call. The active call, evaluates the body of the procedure again once argument substitution has happened. The passive call does not. #(proc,a-procedure,(#(+,1,2,3,4))) #(a-procedure) 10 ##(a-procedure) #(+,1,2,3,4) Arguments are substituted into the body of the procedure. If an argument is missing, nothing is substituted. An argument is substituted into the body everytime that the corresponding parameter marker occurred in the body. #(proc,a-procedure,(%arg1%arg2%arg1),,,%arg1,%arg2) #(a-procedure,abc,---) abc---abc #(a-procedure,abc) abcabc #(a-procedure,,---) --- #(a-procedure,(#(+,1,2,3)),---) 6---6 Each procedure contains a dictionary, which means that other objects can be contained in a procedure. #(proc,a-procedure,(#(+,1,2,3))) #(def,a-procedure.a-string,abcdef) #(a-procedure.a-string) abcdef #(proc,a-procedure.another-procedure,(#(a-procedure))) #(a-procedure.another-procedure) 6 |