Skip to content

Fb Option Profile

Paul Squires edited this page Oct 14, 2026 · 3 revisions

Home › Intrinsic Defines › FB_OPTION_PROFILE

FB_OPTION_PROFILE

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

Remarks

Differences from QB

  • New to FreeBASIC

See also

Examples

#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__

Category: 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.

Clone this wiki locally