Version : alpha
print 'Hello World'
Terminated with a line break at the end of each statement.
-- this is a comment
var i int
i = 1
var f float
f = 0.91
var b bool
b = true
var s string
s = 'Hello World !'
An object is collection of attributes.
var user (id int, name string)
user.id = 1
user.name = 'John Smith'
Array is a collection of values.
Array methods are add, get, set, del, seek and next.
Array properties are key, value, index and size.
var a array
a.add(1)
a.add(2)
do
if a.next() < 0 then
break
end if
loop
if i > 10 then
else if i > 9 then
else
end if
var i int
i = 0
do
if i > 10 then
break
else if i = 0 then
i = i + 2
continue
end if
i = i + 1
loop
var c int
c = get_active_count()
sub get_active_count() int
var user_count int
user_count = select count(*) from users where active = 1;
return user_count
end sub
$ php pecel.php <file><?php
// load the library
require_once('libpecel.php');
// parse source code
$pecel = pecel_load_file('file.sql');
// execute
pecel_exec($pecel);$ php tests/test.php