Core Function SetFlag
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> SetFlag( <enumInst>, <flag/flags>, <state> ) </pre> === Description === Enable or Disable a flag (or array of flags) in a given enum instance. === Parameters === ==== ...") |
(→Return Value) |
||
Line 31: | Line 31: | ||
=== Return Value === | === Return Value === | ||
− | + | Returns the current value of the enumInst (a copy of it) | |
− | + | ||
− | + | ||
=== Remarks === | === Remarks === |
Revision as of 07:50, 15 September 2015
SetFlag( <enumInst>, <flag/flags>, <state> )
Contents |
Description
Enable or Disable a flag (or array of flags) in a given enum instance.
Parameters
enumInst
Instance of an enum (or any integer will do)
flag
Either:
An enum flag (or any integer)
OR
An array of enum flags.
state
Optional; The state to set the flag to should be a boolean of true or false.
Default: true
Return Value
Returns the current value of the enumInst (a copy of it)
Remarks
This is just an easier way to do bit flags.
Example
See HasFlag( ) for examples.