@head @title Miscellaneous type-specific operations

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

Boolean operations

@fun ABool AIsTrue(AValue v) @desc Return a (C) boolean value indicating whether the argument refers to the (Alore) True object. @see @ref{ATrue} @end @end @fun ABool AIsFalse(AValue v) @desc Return a (C) boolean value indicating whether the argument refers to the (Alore) False object. @see @ref{AFalse} @end @end

Type operations

@fun ABool AIsType(AValue v) @desc Return a boolean indicating whether the argument is a @ref{std::Type} object, i.e. a primitive type such as @ref{std::Int} or an ordinary type such as @ref{io::File}. @see @ref{AIsValue} @end @end

Function operations

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

Constant operations

@fun ABool AIsConstant(AValue v) @desc Return a boolean indicating whether the argument is a @ref{std::Constant} object. @end

Pair operations

@fun AValue AMakePair(AThread *t, AValue left, AValue right) @desc Create a @ref{std::Pair} object left : right. @raise-direct @end @fun void AGetPair(AThread *t, AValue v, AValue *left, AValue *right) @desc 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 @ref{TypeError} if the argument is not a Pair object. @raise-direct @end @fun ABool AIsPair(AValue v) @desc Return a boolean indicating whether the argument is a @ref{std::Pair} object. @end

Range operations

@fun AValue AMakeRange(AThread *t, AValue start, AValue stop) @desc Create a @ref{std::Range} object start to stop. @raise-direct @end @fun void AGetRange(AThread *t, AValue v, AValue *start, AValue *stop) @desc 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 @ref{TypeError} if the argument is not a Range object. @raise-direct @end @fun ABool AIsRange(AValue v) @desc Return a boolean indicating whether the argument is a @ref{std::Range} object. @end