-
Notifications
You must be signed in to change notification settings - Fork 1
LogicalExpression
LogicalExpression is an entity type used in PapajScript. It stores instructions that may be executed when calling it. The set of instructions is meant to return either true
or false
. Logical expressions are used in conditionals and some prebuilt functions (e.g. Array.filter
). The LogicalExpression is a successor of a ( <instructions> )
expression, which technically used to be an entity of Function
type, and it was introduced in October 2020. The first RPN Calculator stable version that has LogicalExpressions is 0.5.1.
( <instructions> )
-
( $x 0 >= )
checks ifx
variable is non-negative -
( $x 0 >= $y 0 >= or )
checks ifx
variable is non-negative ory
variable is non-negative -
( 0 >= )
checks if the value being on the top of the PS stack is non-negative -
$T ( 0 >= ) Array.filter
filters the non-negative values fromT
array
Versions of Papaj:
Pre-builds: Bereshit (v.0.0.1), Shemot (v.0.0.2)
Aleph (v.0.1.0), Bet (v.0.2.0), Gimel (v.0.2.1), Dalet (v.0.3.0)
Hey (v.0.3.1), Vav (v.0.4.0), Zain (v.0.4.1), Chet (v.0.4.2), Tet (v.0.4.3)
Yod (v.0.5.0), Khaf (v.0.5.1), Lamed (v.0.5.2), Mem (v.0.5.3), Nun (v.0.5.4), Samech (v.0.5.5)
Development version: Leviathan
Packages of Papaj:
Vanilla, Array, Console, Date, Math, Number, String
Structures of Papaj:
Conditional, Entity, Loop, Variable
Array, Boolean, DateTime, Exception, LogicalExpression, Function, Number, Null, String
Home, PapajScript, Papaj (interpreter), Papaj REPL