Repository navigation
Fb Err
Home › Intrinsic Defines › FB_ERR
Intrinsic define (macro value) set by the compiler
__FB_ERR____FB_ERR__ indicates if -e, -ex, or -exx was specified on the compiler command line at the time of compilation of a module.
__FB_ERR__ indicates if -earray, -enullptr, or -elocation was specified on the compiler command line, or implied by use of -exx, at the time of compilation of a module.
__FB_ERR__ indicates if -edebug, -edebuginfo, or -eassert was specified on the compiler command line, or implied by use of -g, at the time of compilation of a module.
__FB_ERR__ indicates if -eunwind was specified on the compiler command line, or implied by use of -e, -ex, or -exx, at the time of compilation of a module.
__FB_ERR__ indicates if -earraydims was specified on the compiler command line, or implied by use of -exx, at the time of compilation of a module.
Returns bit-wise OR of the following values:
| value | flag | description |
|---|---|---|
| 0 | no flag | |
| 1 | errorcheck | implied by '-e', '-ex', '-exx' |
| 2 | resumeerr | implied by '-ex', '-exx' |
| 4 | extraerrchk | implied by '-exx' |
| 8 | arrayboundchk | implied by '-earray', '-exx' |
| 16 | nullptrchk | implied by '-enullptr', '-exx' |
| 32 | assertions | implied by '-eassert', '-g' |
| 64 | debuginfo | implied by '-edebuginfo', '-g' |
| 128 | debug | implied by '-edebug', '-g' |
| 256 | errlocation | implied by '-elocation', '-exx' |
| 512 | unwindinfo | implied by '-eunwind', '-e', '-ex', '-exx' |
| 1024 | arraydimscheck | implied by '-earraydims', '-exx' |
__FB_ERR__ is always defined.
- New to FreeBASIC
__FB_MT__- Compiler Option: -e
- Compiler Option: -ex
- Compiler Option: -exx
- Compiler Option: -eunwind
- Error Handling
'Example code to demonstrate a use of __FB_ERR__
Dim fb_err_value As Integer
fb_err_value = __FB_ERR__
If fb_err_value = 0 Then
Print "no flag enabled"
Else
If fb_err_value And 1 Then
Print "'errorcheck' flag enabled"
End If
If fb_err_value And 2 Then
Print "'resumeerr' flag enabled"
End If
If fb_err_value And 4 Then
Print "'extraerrchk' flag enabled"
End If
If fb_err_value And 8 Then
Print "'arrayboundchk' flag enabled"
End If
If fb_err_value And 16 Then
Print "'nullptrchk' flag enabled"
End If
If fb_err_value And 32 Then
Print "'assertions' flag enabled"
End If
If fb_err_value And 64 Then
Print "'debuginfo' flag enabled"
End If
If fb_err_value And 128 Then
Print "'debug' flag enabled"
End If
If fb_err_value And 256 Then
Print "'errlocation' flag enabled"
End If
If fb_err_value And 512 Then
Print "'unwindinfo' flag enabled"
End If
If fb_err_value And 1024 Then
Print "'arraydimscheck' flag enabled"
End If
End IfCategory: Intrinsic Defines
Kind: keyword
Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- Partial Types
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing