FB_OPTION_PROFILE
- Source: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgDdfboptionprofile
- Last revised: 2024-05-01
Intrinsic define set by the compiler
Syntax
` FB_OPTION_PROFILE
`
Description
Intrinsic define set to an integer to indicate that the profiling code is generated:
__FB_OPTION_PROFILE__ is set to non-zero when profiling code is generated
__FB_OPTION_PROFILE__ is set to zero when profiling code is not generated
#pragma profile allows to control the generation of profiling code.
This allows optionally including or excluding sections of source code to be profiled:
when #pragma profile = true, then profiling code is generated
when #pragma profile = false, then profiling code is not generated
Examples
start GeSHi
vb
#cmdline "-profgen fb"
' profiling code generated
Print __FB_OPTION_PROFILE__
#pragma profile = false
' profiling code not generated
Print __FB_OPTION_PROFILE__
#pragma profile = true
' profiling code generated
Print __FB_OPTION_PROFILE__end GeSHi
Version
- Since fbc 1.20.0
Differences from QB
- New to FreeBASIC
See also
Back to DocToc