Bool=Null vs Bool=False?

About Monkey 2 Forums Monkey 2 Programming Help Bool=Null vs Bool=False?

This topic contains 1 reply, has 2 voices, and was last updated by  abakobo 2 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16050

    jondecker76
    Participant

    Is there a way to tell the difference between Null and False when it comes to a Boolean? For example, how could you test to tell which of these were null vs false? :

    Thanks in advance

    #16051

    abakobo
    Participant

    In monkey every type can be null. In other typed languages like cpp, only pointers can be null.
    So in monkey only referenced types (ie classes and arrays) can have the ‘real’ Null value.
    The other types (ints, floats, bool,…) will have a zero/false value as null. And there is no difference between null and zero/false.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.