is_dict

Definition: bool d = is_dict(object tid)
Description: A simple function that can be used to determine whether something is plausibly a valid dictionary index.
Comments: As noted in using types (although this is a function, not a type), you should not overly rely on the result of this or other similar functions, although you can always trust it when it says definitely not.
    dictionary myid = new_dict()
    ...
    destroy_dict(myid)
    dictionary myid2 = myid
has predictable results: despite assigning a variable declared as dictionary to another variable of the same type, a typecheck will still occur, and obviously invoking delete_dict(myid) cannot and should not trigger a typecheck on the existing value already held in myid; any error occurs on assignment to myid2, not before. -->
Example:
integer tid = new_dict()
if not is_dict(tid) then ?9/0 end if
See Also: new_dict