-
Notifications
You must be signed in to change notification settings - Fork 1
Entity
Entity – a single computable element in PapajScript.
The first entities, Number and String, were introduced on April 26, 2018 with the release of the RPN 0.4.0.
Current usable entity types:
-
Number
, e.g.5, 2, -10, 20.5
etc.
More explanation here. -
String
, e.g."Hello world!", "Shalom!", "h"
etc.
More explanation here.
See the functions for strings in the String package. -
Boolean
, e.g.TRUE, FALSE
See the logical functions here. -
Null
, e.g.NULL
-
Function
, e.g.fun{ -1 * }
etc.
More explanation here. -
Exception
, e.g.EXC
(as of now just basic ones, to be improved) -
Array
, e.g.[]
,[ 2 1 3 7 ]
,[ 10 times rand ]
More explanation here.
See the functions for arrays in the Array package. -
LogicalExpression
, e.g.( x 0 > )
More explanation here. -
DateTime
, e.g."2005-04-02 21:37:00" Date.toDateTime
More explanation here.
See the functions for arrays in the Date package.
Quasi-types:
-
InstructionBlock
, e.g.{ x 2 ^ 2 / }
Planned for the future
Object
File
Dataframe
Current unusable data types:
Unknown
Removed/replaced types:
-
Expression
, e.g.( x 0 > )
– replaced byLogicalExpression
in September 2020
Syntax: X command
Programme Operand | Purpose |
---|---|
toString | convert to a string |
toNumber | convert to a number |
toBoolean | convert to a logical value true or false
|
toArray | build an array from N elements of the stack |
toException | build an exception (if X is a string, then it creates an unraised exception with this string message) |
Date.toDateTime | builds a datetime either from a string or a real number (assuming it represents Unix epoch time) |
raiseException | same as above, but it raises exception too |
Syntax: X command
-
type
returns a string containing entity type, e.g."String"
-
isNumber
,isBoolean
,isString
,isArray
,isNull
,isException
,isLogicalExpression
,isFunction
,isDateTime
– returnTRUE
orFALSE
relatively if an entity is of a type mentioned in the function
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