andflags - luxembourg/muxcode-clm GitHub Wiki

ANDFLAGS()

FUNCTION: andflags(<object>,<list of flags>)

This function returns 1 (TRUE) if <object> has all the flags in a specified list, and 0 (FALSE) if it does not. The list is specified with a single letter standing for each flag, like the output of the FLAGS() function. A '!' preceding a flag letter means "not flag".

Thus, ANDFLAGS(me,WD) would return 1 if I were set WIZARD and DARK. ANDFLAGS(me,W!Dc) would return 1 if I were set WIZARD, not DARK, and CONNECTED.

If a letter does not correspond to any flag, <object> doesn't have it, so the function returns 0. There can be an arbitrary number of flags. Do not put spaces between flag letters.

Related Topics: flags, orflags