compile - Used to compile a file.
compile(error : variable, src : filename, dst : "filename")
This function is used to compile a file from a template and produce a binary file.
Here is the list of parameters:
Note: In the followings examples, the _ between the { should be removed to make it work.
res={_{ compile(); }}. return src and dst must be specify res={_{ compile(src:"",dst:""); }}. return Can't open input file res={_{ remove("/tmp/tib.sn"); write(data:"test {_{ a=5; a * 6; }}",file:"/tmp/tib.sn"); compile(error:t,src:"/tmp/tib.sn",dst:"/tmp/tib.snc"); include("/tmp/tib.snc"); remove("/tmp/tib.sn"); t.errcode; }}. return res=test 300. res={_{ remove("/tmp/tib.sn"); write(data:"test {_{ a = 5; a * ; }}",file:"/tmp/tib.sn"); compile(src:"/tmp/tib.sn",dst:"/tmp/tib.snc"); include("/tmp/tib.snc"); remove("/tmp/tib.sn"); }}. return Error while parsing template res={_{ remove("/tmp/tib.sn"); write(data:"test {_{ a = 5; a * ; }}",file:"/tmp/tib.sn"); compile(error:t,src:"/tmp/tib.sn",dst:"/tmp/tib.snc"); t.errcode; remove("/tmp/tib.sn"); }}. return res=14. res={_{ remove("/tmp/tib.sn"); write(data:"test {_{ global c; a = 5; c = a * c; c; }}",file:"/tmp/tib.sn"); compile(src:"/tmp/tib.sn",dst:"/tmp/tib.snc"); c=12; include("/tmp/tib.snc"); c; }}. return res=test 6060.
Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com