UnDefine array/const/interface/list/struct/var
Posted: Fri May 19, 2006 1:36 pm
Like in C, it could be useful in some case to 'undef' a variable.
for example, the NOTIFYICONDATA structure is declared in PureBasic but it is the Win95 definition.
If i want to define my own WinXP compatible structure i have to rename it as something like NOTIFYICONDATA_XP.
so, in this case, an UnDefine keyword could be use as this :
for example, the NOTIFYICONDATA structure is declared in PureBasic but it is the Win95 definition.
If i want to define my own WinXP compatible structure i have to rename it as something like NOTIFYICONDATA_XP.
so, in this case, an UnDefine keyword could be use as this :
Code: Select all
CompilerIf Defined(NOTIFYICONDATA, #PB_Structure) ; Compiler check not really useful
UnDefine NOTIFYICONDATA ; Undefine the Win95 definition
Structure NOTIFYICONDATA ; Updated for WinXP
cbSize.l
hwnd.l
uId.l
uFlags.l
uCallbackMessage.l
hIcon.l
szTip.c[64]
dwState.l
dwStateMask.l
szInfo.c[256]
StructureUnion
uTimeout.l
uVersion.l
EndStructureUnion
szInfoTitle.c[64]
dwInfoFlags.l
guid.GUID
EndStructure
CompilerEndIf