ie:
Code: Select all
CompilerIf Defined(MyProc,#pb_Procedure)
ie: Droppy lib has RegDeleteKey(); but let's say we've got one we're using.
Rather than changing all instances of our function, or removing droopy; we could issue:
Code: Select all
Forget(RegDeleteKey,#pb_procedure)
Code: Select all
Forget(RegDeleteKey,#pb_procedure)
procedure RegDeleteKey()
...
I used droopy as an example, as it seems popular; I wrote a bunch of code that when I handed it over; they sent it back with requests to change a few (internal to my block) function names as they collide with the pre-existing programs functions.
A variation on it, might be similar to a module:
Code: Select all
; fnShowWindow() is already defined or it may be defined 'later' but for our block of code, we also have it, so:
SetLocal() ; Compiler directive to keep the following code as it's own universe
global hWnd
procedure fnShowWIndow()
endprocedure
EndLocal() ; Compiler directive to end the 'local definitions'
Part of this is thinking outloud about other ways to handle the same basic concept...