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 documentationFunction overwriting

Functionalities provided by the language can be overwritten by simply defining a new one.

None of the "core functions", "reference functions" or "object functions" can be overwritten (although many of them have alternatives which can indeed be overwritten). No basic language constructs can be overwritten either.

Where it can be achieved, it is done by simply declaring the function within the code.

In this example, we are overwriting the multiply (removed as of version 1.3.7) function:

YASS
function multiply($n, $times)
  //Multiply
  $out = 0
  for($i = 0, $i < $times, 1)
    $out = $out + $n
  end for

  return ($out)
end function
Comments

There are no comments on this page.

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