The basics
Give an idea a name
Functions keep a useful piece of behaviour together and make it easy to use again.
function greet($name)
return "Hello " + $name
end function
print(greet("Jamie"))
Hello Jamie
Start with a small program, understand the shape of it, and then make it your own. These examples are here to show how YASS reads and what ZPE can do with it.
Functions keep a useful piece of behaviour together and make it easy to use again.
function greet($name)
return "Hello " + $name
end function
print(greet("Jamie"))
Records provide a clear way to group related values and construct named data.
record pupil
forename = ""
surname = ""
age = 0
end record
$pupil = new pupil(surname = "Smith", age = 35)
print($pupil)
YASS Web Pages combine a normal page structure with a small amount of dynamic application code.
<?ywp
$page_title = "Welcome"
$name = "Jamie"
render("/templates/base.ywp")
ywp?>
<h1>Hello <?ywp print($name) ywp?></h1>
YASS gives common programming tasks a direct shape without hiding what the program is doing.
$numbers = [1, 2, 3, 4, 5]
$total = 0
for ($number in $numbers)
$total = $total + $number
end for
print($total)
Use the same language for automation, websites, native applications, data processing and the projects you have not thought of yet.