How to add your knowledge

typeCheck()

    Table of contents
    1. 1. Synopsis
    2. 2. Syntax
    3. 3. Example 1
    4. 4. Example 2
    5. 5. Example 3

    Synopsis

    Determines if Value is acceptable for the type indicated by typeName. The typeName() function is a complementary function that returns the type of a value.

    Syntax

    typeCheck ( value As Any, _
                TypeName As Name ) As Boolean 
    Argument Type Description
    value Any Input value to test; this argument is permitted to be NoValue.
    TypeName Name Data type name, such as Number, String, Part, etc.

    Example 1

    Integers are Numbers

    Intent >typeCheck(1, :number) 
    --> True 

    Example 2

    Names are not Strings

    Intent >typeCheck(:NNNN, :string) 
    --> False

    Example 3

    Root is a Part

    Intent >typeCheck(Root, :part) 
    --> True