To use this website fully, you first need to accept the use of cookies. By agreeing to the use of cookies you consent to the use of functional cookies. For more information read this page.

Official ZPE Programming Environment documentationC-style syntax

YASS has supported compilation of a C style syntax since a very early version. It is therefore possible to compile YASS syntax with C like constructs in it (remember that C is one of the languages to inspire ZPE).

Although this page has not yet explain how ZPE functions work, this sample discusses how to write a ZPE function in the C syntax (note there are no semi-colons but braces):

YASS
function main() {
  $x = 10
}
    

The use of the braces means that end function is not required.

Almost every, if not every, construct in ZPE, supports the C style notation as well as the standard (sugary syntax). For example, for-loops support it:

YASS
for ($i = 0; $i < 10; $i++) {
  $x = 10
}
    
Comments

There are no comments on this page.

New comment
Reply
Provide feedback on this page
Comments are sent via email to me.