Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Purpose is to allow procedures in sources to be compiled as separate modules with public linkage or as privately included with minimal overhead for changing desired linkage. - set default procedure linkage with '#pragma private [=value]' or '#pragma push( private [,value] )' - #pragma private - #pragma private = true - #pragma private = false - #pragma push( private ) - #pragma push( private, true ) - #pragma push( private, false ) - #pragma pop( private )
- Loading branch information
Showing
3 changed files
with
154 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
' TEST_MODE : COMPILE_ONLY_OK | ||
|
||
'' #pragma private | ||
'' #pragma private = false | ||
'' #pragma private = true | ||
'' #pragma push( private ) | ||
'' #pragma push( private, false ) | ||
'' #pragma push( private, true ) | ||
'' #pragma pop( private ) | ||
'' | ||
|
||
'' default value | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
'' test implicit true | ||
|
||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma private | ||
#assert( __FB_OPTION_PRIVATE__ = true ) | ||
|
||
#pragma private = false | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
'' test explicit true | ||
|
||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma private = true | ||
#assert( __FB_OPTION_PRIVATE__ = true ) | ||
|
||
#pragma private = false | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
|
||
'' test implicit push | ||
|
||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma push( private ) | ||
#assert( __FB_OPTION_PRIVATE__ = true ) | ||
|
||
#pragma pop( private ) | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
'' test explicit push false, push false nested | ||
|
||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma push( private, false ) | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma push( private, false ) | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma pop( private ) | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma pop( private ) | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
'' test explicit push false, push true nested | ||
|
||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma push( private, false ) | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma push( private, true ) | ||
#assert( __FB_OPTION_PRIVATE__ = true ) | ||
|
||
#pragma pop( private ) | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma pop( private ) | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
'' test explicit push true, push false nested | ||
|
||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma push( private, true ) | ||
#assert( __FB_OPTION_PRIVATE__ = true ) | ||
|
||
#pragma push( private, false ) | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma pop( private ) | ||
#assert( __FB_OPTION_PRIVATE__ = true ) | ||
|
||
#pragma pop( private ) | ||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
'' test explicit push true, push false nested | ||
|
||
#assert( __FB_OPTION_PRIVATE__ = false ) | ||
|
||
#pragma push( private, true ) | ||
#assert( __FB_OPTION_PRIVATE__ = true ) | ||
|
||
#pragma push( private, true ) | ||
#assert( __FB_OPTION_PRIVATE__ = true ) | ||
|
||
#pragma pop( private ) | ||
#assert( __FB_OPTION_PRIVATE__ = true ) | ||
|
||
#pragma pop( private ) | ||
#assert( __FB_OPTION_PRIVATE__ = false ) |