ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:notflag

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
functions:notflag [2017/07/15 15:31] – created korshunfunctions:notflag [2017/07/15 16:33] (current) korshun
Line 1: Line 1:
 ====== notflag ====== ====== notflag ======
 +{{tag>math bitfield}}
 ''bool notflag(int allflags, int flag)'' ''bool notflag(int allflags, int flag)''
  
 ===== Description ===== ===== Description =====
 Returns true if the given flag is **not** set in ''allflags''. Shorthand for ''!(allflags & flag)''. Returns true if the given flag is **not** set in ''allflags''. Shorthand for ''!(allflags & flag)''.
 +
 +===== Examples =====
 +<code>
 +if (notflag(flags, FLAG_NOSOMETHING))
 +{
 +    DoSomething();
 +    ...
 +}
 +</code>
functions/notflag.1500121864.txt.gz · Last modified: 2017/07/15 15:31 by korshun