Miscellaneous type-specific operations

This section contains several operations specific to various primitive types that were not covered in previous sections.

Boolean operations

ABool AIsTrue(AValue v)
Return a (C) boolean value indicating whether the argument refers to the (Alore) True object.

See also: ATrue

ABool AIsFalse(AValue v)
Return a (C) boolean value indicating whether the argument refers to the (Alore) False object.

See also: AFalse

Type operations

ABool AIsType(AValue v)
Return a boolean indicating whether the argument is a std::Type object, i.e. a primitive type such as std::Int or an ordinary type such as io::File.

See also: AIsValue

Function operations

ABool AIsFunction(AValue v)
Return a boolean indicating whether the argument is a std::Function object, i.e. a global function object such as std::Sort or a bound method.

Constant operations

ABool AIsConstant(AValue v)
Return a boolean indicating whether the argument is a std::Constant object.

Pair operations

AValue AMakePair(AThread *t, AValue left, AValue right)
Create a std::Pair object left : right. Raise a direct exception on all error conditions.
void AGetPair(AThread *t, AValue v, AValue *left, AValue *right)
If the argument is a Pair object, store its left and right values in the locations pointed to by the left and right arguments. Raise TypeError if the argument is not a Pair object. Raise a direct exception on all error conditions.
ABool AIsPair(AValue v)
Return a boolean indicating whether the argument is a std::Pair object.

Range operations

AValue AMakeRange(AThread *t, AValue start, AValue stop)
Create a std::Range object start to stop. Raise a direct exception on all error conditions.
void AGetRange(AThread *t, AValue v, AValue *start, AValue *stop)
If the argument is a Range object, store its start and stop values in the locations pointed to by the start and stop arguments. Raise TypeError if the argument is not a Range object. Raise a direct exception on all error conditions.
ABool AIsRange(AValue v)
Return a boolean indicating whether the argument is a std::Range object.