Feature #8514

RETNIL() macro

Added by alef about 5 years ago. Updated about 5 years ago.

Status:Closed Start date:01/25/2010
Priority:Normal Due date:
Assignee:killswitch % Done:

100%

Category:Macros
Target version:v0.3.1
Component: Affected Version:
Close Reason:

Description

A function could set a var to nil and use it as return, like source:/addons/common/fnc_defaultParam.sqf.
The macro
1 #define RETNIL(x) call{if(isNil{x})then{nil}else{x}}
could be used here and there to avoid errors dereferencing undefined vars.

Change the name if don't like it.

History

Updated by killswitch about 5 years ago

  • Status changed from New to Resolved
  • Assignee set to killswitch
  • Target version set to v0.3.x
  • % Done changed from 0 to 100

Updated by Sickboy about 5 years ago

  • Status changed from Resolved to Closed

Updated by Sickboy about 5 years ago

  • Target version changed from v0.3.x to v0.3.1

Also available in: Atom PDF