Skip to content

Fb Argv

Paul Squires edited this page Sep 19, 2026 · 1 revision

Home › Intrinsic Defines › FB_ARGV

FB_ARGV

Intrinsic define (macro value) set by the compiler

Syntax

__FB_ARGV__

Description

Substituted with a pointer to a list of pointers to the zero terminated command line arguments passed in on the command line including the name of the executable.

__FB_ARGV__ is the name of a parameter passed to the program's implicit main function, and therefore is only defined in the module level code of the main module for an application.

Remarks

Differences from QB

  • New to FreeBASIC

See also

Examples

Sub displayCommandLineArguments( ByVal argc As Integer, ByVal argv As ZString Ptr Ptr )

    Dim i As Integer

    For i = 0 To argc - 1

        Print "arg "; i; " = '"; *argv[i]; "'"

    Next i

End Sub

displayCommandLineArguments( __FB_ARGC__, __FB_ARGV__ )

Sleep

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