Skip to content

Commit 39f507d

Browse files
committed
fbdocs: wiki snapshot 2021.12.31
1 parent 5d447ad commit 39f507d

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

doc/manual/cache/DevBindingCreation.wakka

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In general, FB and ""C/C++"" are very similar. FB follows the same ABI as GCC wh
99

1010
{{fbdoc item="section" value="Data types"}}
1111

12-
{{table columns="3" cellpadding="1" cells=" C/C++ type ; Size in bytes (GCC on Linux/Windows) ; Corresponding FreeBASIC type ; char ; 1 ; Byte ; short [int] ; 2 ; Short ; int ; 4 ; Long ; enum (underlying type int) ; 4 ; Long ; long long [int] ; 8 ; LongInt ; float ; 4 ; Single ; double ; 8 ; Double ; long double ; 12 on 32bit, 16 on 64bit ; CLongDouble from crt/longdouble.bi ; _Bool/bool ; 1 ; Byte / Boolean ; * (pointer) ; 4 on 32bit, 8 on 64bit ; Ptr/Pointer ; ssize_t, intptr_t ; 4 on 32bit, 8 on 64bit ; Integer ; size_t, uintptr_t ; 4 on 32bit, 8 on 64bit ; UInteger ; long [int] ; 4 on 32bit systems and Win64 (!), 8 on 64bit Linux/BSD ; CLong from crt/long.bi "}}
12+
{{table columns="3" cellpadding="1" cells=" C/C++ type ; Size in bytes (GCC on Linux/Windows) ; Corresponding FreeBASIC type (on 32bit or 64bit) ; char ; 1 ; Byte ; short [int] ; 2 ; Short ; int ; 4 ; Long ; enum (underlying type int) ; 4 ; Long ; long long [int] ; 8 ; LongInt ; float ; 4 ; Single ; double ; 8 ; Double ; long double ; 12 on 32bit, 16 on 64bit ; CLongDouble from crt/longdouble.bi ; _Bool/bool ; 1 ; Byte / Boolean ; * (pointer) ; 4 on 32bit, 8 on 64bit ; Ptr/Pointer ; ssize_t, intptr_t ; 4 on 32bit, 8 on 64bit ; Integer ; size_t, uintptr_t ; 4 on 32bit, 8 on 64bit ; UInteger ; long [int] ; 4 on 32bit systems and Win64 (!), 8 on 64bit Linux/BSD ; CLong from crt/long.bi "}}
1313

1414
- Caveat: ##int##/##long## is not ##Integer##/##Long##. In FB, ##Integer## corresponds to ##Pointer## - it's 32bit on 32bit and 64bit on 64bit (on all operating systems). ##Long## stays 32bit everywhere. In C, ##int## stays 32bit everywhere, and ##long## only corresponds to pointers on Linux/BSD systems, but not on ""Win64"", where ##long## is still 32bit. On ""Win64"", ##long long## is the only 64bit integer type in C. Thus, neither C's ##int## nor C's ##long## are compatible to FB's ##Integer##.
1515
- Caveat: ##long int## is not ##""LongInt""##. FB's ##""LongInt""## corresponds to C's ##long long##, not C's ##long##.

doc/manual/cache/KeyPgDdfbargleftof.wakka

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Intrinsic define (macro) performed by the compiler.
1414

1515
{{fbdoc item="desc"}}
1616
Returns the left token of the argument (##//arg//##), based on the separator (##//sep//##).
17+
(in the expression of the argument, the tokens and the separator must be spaced)
1718

1819
By default, if the default return (##//ret//##) is not given, the macro returns nothing (empty token) if the separator (##//sep//##) is not found.
1920
Otherwise, if the default return (##//ret//##) is given, the macro returns the default return (##//ret//##) if the separator (##//sep//##) is not found.
@@ -38,7 +39,8 @@ Sleep
3839
left-side
3940
Not found 'versus'
4041
'/
41-
%%
42+
%%
43+
4244
See also ##[[KeyPgDdfbargrightof|__FB_ARG_RIGHTOF__]]## example.
4345

4446
{{fbdoc item="ver"}}

doc/manual/cache/KeyPgDdfbargrightof.wakka

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Intrinsic define (macro) performed by the compiler.
1414

1515
{{fbdoc item="desc"}}
1616
Returns the right token of the argument (##//arg//##), based on the separator (##//sep//##).
17+
(in the expression of the argument, the tokens and the separator must be spaced)
1718

1819
By default, if the default return (##//ret//##) is not given, the macro returns nothing (empty token) if the separator (##//sep//##) is not found.
1920
Otherwise, if the default return (##//ret//##) is given, the macro returns the default return (##//ret//##) if the separator (##//sep//##) is not found.
@@ -38,7 +39,8 @@ Sleep
3839
right-side
3940
Not found 'versus'
4041
'/
41-
%%
42+
%%
43+
4244
{{fbdoc item="filename" value="examples/manual/defines/fbargrightof2.bas"}}%%(freebasic)
4345
#macro count( range )
4446
Scope
@@ -75,7 +77,7 @@ Counting 7 to 2
7577
3
7678
2
7779
'/
78-
%%
80+
%%
7981
{{fbdoc item="ver"}}
8082
- Since fbc 1.08.0
8183

doc/manual/cache/KeyPgPpPragma.wakka

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ Preprocessor directive
1111
{{fbdoc item="param"}}
1212
Possible values for ##//option//## and related ##//value//##s:
1313

14-
{{table columns="3" cellpadding="1" cells="Option; Value; Description; msbitfields; 0; Use bitfields compatible with gcc (default);###; -1 (or any other non-zero value); Use bitfields compatible with those used in Microsoft C compilers; once; N/A; cause the source file in which the pragma appears to behave as though it was included with #include once ...; constness; 0; cause the source file in which the pragma appears to disable 'CONST qualifier discarded' warning;###; -1 (or any other non-zero value); cause the source file in which the pragma appears to enable 'CONST qualifier discarded' warning"}}
14+
{{table columns="3" cellpadding="1" cells="Option; Value; Description; msbitfields; false; Use bitfields compatible with gcc (default); msbitfields; true ; Use bitfields compatible with those used in Microsoft C compilers; once; N/A; cause the source file in which the pragma ppears to behave as though it was included with #include once ...; constness; false; disable 'CONST qualifier discarded' warning in current source; constness; true; enable 'CONST qualifier discarded' warning in current source; lookup108; false; use normal symbol lookups for unqualified symbol names; lookup108; true; use fbc-1.08.x or earlier symbol lookups for unqualified symbol names;"
15+
}}
1516

16-
If //value// is not given, the compiler assumes //-1// (//TRUE//).
17+
If //value// is not given, the compiler assumes //True// (//-1//). A zero (//0//) value may be used in place of //False//. A non-zero (for example, //-1//) value may be used in place of //True//.
1718

1819
{{fbdoc item="desc"}}
1920
Allows the setting of compiler options inside the source code.
2021

21-
**Push** saves the current value of the //option// onto a stack, then assigns the new //value// (or //-1//) to it. **Pop** restores the //option// to its previous value, and removes it from the stack. This mechanism allows options to be changed for a certain part of source code, regardless of the setting used by the context, which is especially useful inside #include header files.
22+
**Push** saves the current value of the //option// onto a stack, then assigns the new //value// (or //True//) to it. **Pop** restores the //option// to its previous value, and removes it from the stack. This mechanism allows options to be changed for a certain part of source code, regardless of the setting used by the context, which is especially useful inside #include header files.
2223

2324
**##constness##** pragma is added for testing fbc compiler. It will be removed in future at should not be relied upon.
2425

@@ -33,6 +34,9 @@ Preprocessor directive
3334
#pragma pop(msbitfields)
3435
%%
3536

37+
{{fbdoc item="ver"}}
38+
- //#pragma lookup108// added in version 1.09.0, and to be removed in next minor release
39+
3640
{{fbdoc item="diff"}}
3741
- New to ""FreeBASIC""
3842

doc/manual/cache/KeyPgUsing.wakka

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ Brings namespace symbols into the current scope
99

1010
{{fbdoc item="desc"}}
1111
The ##**Using**## command allows all symbols from a given namespace to be accessed without the namespace's name prefix. Unlike ""C++"" but like C#, the ##[[KeyPgNamespace|Namespace]]## keyword is not needed after ##**Using**##, because individual symbols cannot be inherited from a namespace.
12-
Inheriting a whole namespace can save typing, but sometimes some meaning of the code can be lost, and conflicts with other symbols could be created. For example, if there is duplicated symbol in the global namespace (unnamed namespace), access to local symbol is captured by duplicated global symbol (in that case, full prefixing is required to access local symbol).
12+
13+
##**Using**## is allowed in namespaces and procedures only (not in type or union or enum declarations).
14+
15+
Inheriting a whole namespace can save typing, but sometimes some meaning of the code can be lost, and conflicts with other symbols could be created.
1316

1417
{{fbdoc item="ex"}}
15-
{{fbdoc item="filename" value="examples/manual/module/using.bas"}}%%(freebasic)
18+
{{fbdoc item="filename" value="examples/manual/module/using.bas"}}%%(freebasic)
1619
Namespace Sample
1720
Type T
1821
x As Integer
@@ -31,6 +34,8 @@ Using Sample
3134
'' without the "Sample." prefix.
3235
Dim OtherVariable As T
3336
%%
37+
{{fbdoc item="ver"}}
38+
- Before fbc 1.09.0, if there is duplicated symbol in the global namespace (unnamed namespace), access to local symbol is captured by duplicated global symbol (in that case, full prefixing is required to access local symbol).
3439

3540
{{fbdoc item="diff"}}
3641
- QB had the ##**Using**## keyword, but for other purposes. Namespaces did not exist in QB.

0 commit comments

Comments
 (0)