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/YASS documentationis_set

is_set (mixed variable) ⇒ boolean

Determines if a variable has already been defined locally, globally or as a parameter. This is particularly useful for determining if an optional parameter has been defined.

First available: Version 1.3.1

Using is_set

The is_set function is one of the oldest functions in ZPE and has existed since one of the first versions. It's underlying implementation has remained somewhat the same throughout the development until about version 1.5.x where it had a major overhaul.

It is a very powerful function with one of the most unique capabilities of all predefined functions because it has the ability to assess unevaluated variables.

The function can be used to check if an index of a value exists too, so this can be used to check the arguments of a program:


The is_set function can also be used on pure values:


The result when applied to a value will always yield true.

Code previewClose
Feedback 👍
Comments are sent via email to me.