Topic Sample

General style page for topics.

On this page:

Components of a Topic:

Syntax: Declaration versus Usage:

FreeBASIC is very compatible with QBasic and therefore inherits much of the quirkiness of the QBasic syntax. While some keywords (primarily functions and subs) can be specified with a full declaration (or prototype), many statements can not. (not easily anyway) Visually the appearance of the usages and declarations should be similar and resemble the examples below. Where possible full declarations for functions and subs should be added.

Usage Example:
PSet [target ,] [STEP] (x, y) [,color]

Declaration Example:

All topics should continue to include the existing syntax section of the documents as-is (with additional font formatting as needed). Where applicable, a declaration section should be added. The syntax line and the declaration line follow the same font formatting rules.

Font styles

Sample Page:


Brief sentence describing intent of function.

declare function Function( param1 as string, param2 as integer = &H1234 ) as integer

result = Function( param1 [, param2 ] )

A description of parameter. Format of parameter is monospaced italic with one indent. Description of parameter is normal text with two indents.
A description of parameter. For example: Optional. If omitted a default value of &H1234 is assumed.

Return Value:
Description of return value, including possible failure return. If this section is not present, no return value or return value not applicable is assumed. If the section is present and there is no return value, a simple "None" will suffice.

Short paragraph describing what function does, quirky properties, etc. At this point, most of what the function/sub does should be described in the previous sections. This is a good place to provide data tables, discussions on interactions with other functions/subs, tips, pitfalls, etc.

Any additional information.

Example #1:
Const param1 As String = "a string"
Const param2 As Integer = &Hdeadbeef

Function func( a As String, b As Integer = 0) As Integer
    Return Val(a)+b
End Function

    '' acquire result
    Dim As Integer result
    result = func( param1 )
    '' acquire new result with param2
    result = func( param1, param2 )

sample output
sample output
sample output
sample output

Dialect Differences:
Platform Differences:
Differences from QB:
See also:
Back to FB Wiki - Help
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki phatcode