Skip to content

Commit a8d5d02

Browse files
committed
fbdoc: wiki snapshot 2018-09-02
1 parent 9d4da3f commit a8d5d02

21 files changed

+96
-148
lines changed

doc/manual/cache/CatPgFullIndex.wakka

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Alphabetical listing of keywords, macros and procedures.
213213
- {{fbdoc item="keyword" value="KeyPgDefuint|DEFUINT"}}
214214
- {{fbdoc item="keyword" value="KeyPgDefulongint|DEFULONGINT"}}
215215
- {{fbdoc item="keyword" value="KeyPgDefushort|DEFUSHORT"}}
216-
- {{fbdoc item="keyword" value="KeyPgOpDelete|DELETE"}}
216+
- {{fbdoc item="keyword" value="KeyPgOpDelete|DELETE (Statement)"}}
217217
- {{fbdoc item="keyword" value="KeyPgDestructor|DESTRUCTOR"}}
218218
- {{fbdoc item="keyword" value="KeyPgModuleDestructor|DESTRUCTOR (Module)"}}
219219
- {{fbdoc item="keyword" value="KeyPgDim|DIM"}}
@@ -367,7 +367,7 @@ Alphabetical listing of keywords, macros and procedures.
367367
- {{fbdoc item="keyword" value="KeyPgNaked|NAKED"}}
368368
- {{fbdoc item="keyword" value="KeyPgName|NAME"}}
369369
- {{fbdoc item="keyword" value="KeyPgNamespace|NAMESPACE"}}
370-
- {{fbdoc item="keyword" value="KeyPgOpNew|NEW"}}
370+
- {{fbdoc item="keyword" value="KeyPgOpNew|NEW (Expression)"}}
371371
- {{fbdoc item="keyword" value="KeyPgOpPlacementNew|NEW (Placement)"}}
372372
- {{fbdoc item="keyword" value="KeyPgNext|NEXT"}}
373373
- {{fbdoc item="keyword" value="KeyPgResumenext|NEXT (RESUME)"}}

doc/manual/cache/CatPgOpIndex.wakka

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ List of operators used in FreeBASIC.
8484
- {{fbdoc item="keyword" value="KeyPgOpIs|IS (Run-time type information operator)"}}
8585

8686
{{fbdoc item="section" value="Memory Operators"}}
87-
- {{fbdoc item="keyword" value="KeyPgOpNew|New"}}
87+
- {{fbdoc item="keyword" value="KeyPgOpNew|New Expression"}}
88+
- {{fbdoc item="keyword" value="KeyPgOpNewOverload|New Overload"}}
8889
- {{fbdoc item="keyword" value="KeyPgOpPlacementNew|Placement New"}}
89-
- {{fbdoc item="keyword" value="KeyPgOpDelete|Delete"}}
90+
- {{fbdoc item="keyword" value="KeyPgOpDelete|Delete Statement"}}
91+
- {{fbdoc item="keyword" value="KeyPgOpDeleteOverload|Delete Overload"}}
9092

9193
{{fbdoc item="section" value="Iteration Operators"}}
9294
- {{fbdoc item="keyword" value="KeyPgOpFor|For"}}, [[KeyPgOpNext|Next]], and [[KeyPgOpStep|Step]]

doc/manual/cache/CatPgOpMemory.wakka

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ Operators that work with memory
33

44
The memory operators provide a way to dynamically allocate and deallocate variables and objects.
55

6-
<<=={{fbdoc item="keyword" value="KeyPgOpNew|Operator New"}}==
6+
<<=={{fbdoc item="keyword" value="KeyPgOpNew|Operator New Expression"}}==
77
Allocates memory for and constructs objects.
8+
=={{fbdoc item="keyword" value="KeyPgOpNewOverload|Operator New Overload"}}==
9+
Overloads memory allocation process of Operator New Expression when applying to UDT.
810
=={{fbdoc item="keyword" value="KeyPgOpPlacementNew|Operator Placement New"}}==
911
Constructs objects at a specified memory location.
10-
<<>>=={{fbdoc item="keyword" value="KeyPgOpDelete|Operator Delete"}}==
12+
<<>>=={{fbdoc item="keyword" value="KeyPgOpDelete|Operator Delete Statement"}}==
1113
Destroys and deallocates memory for objects.
12-
>>::c::
14+
=={{fbdoc item="keyword" value="KeyPgOpDeleteOverload|Operator Delete Overload"}}==
15+
Overloads memory deallocation process of Operator Delete Statement when applying to UDT.>>::c::
1316

1417
{{fbdoc item="back" value="CatPgOperators|Operators"}}

doc/manual/cache/CatPgVariables.wakka

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{{fbdoc item="title" value="Variable Declarations"}}----
22
Statements to declare and allocate space for variables.
33

4-
<<=={{fbdoc item="keyword" value="KeyPgDim|DIM"}}==
4+
<<**{{fbdoc item="keyword" value="KeyPgDim|DIM"}}**
55
Declares a variable at the current scope.
6-
=={{fbdoc item="keyword" value="KeyPgConst|CONST"}}==
6+
**{{fbdoc item="keyword" value="KeyPgConst|CONST"}}**
77
Declares a non-modifiable variable.
8-
=={{fbdoc item="keyword" value="KeyPgScope|SCOPE"}}==
8+
**{{fbdoc item="keyword" value="KeyPgScope|SCOPE"}}**
99
Begins a new scope block.
10-
=={{fbdoc item="keyword" value="KeyPgStatic|STATIC"}}==
10+
**{{fbdoc item="keyword" value="KeyPgStatic|STATIC"}}**
1111
Declares variables in a procedure that retain their value between calls.
12-
<<>>=={{fbdoc item="keyword" value="KeyPgShared|SHARED"}}==
12+
<<>>**{{fbdoc item="keyword" value="KeyPgShared|SHARED"}}**
1313
Used with ##[[KeyPgDim|Dim]]## allows variables to be visible throughout a module.
14-
=={{fbdoc item="keyword" value="KeyPgVar|VAR"}}==
14+
**{{fbdoc item="keyword" value="KeyPgVar|VAR"}}**
1515
Declares variables where the data type is implied from an initializer.
16-
=={{fbdoc item="keyword" value="KeyPgByrefVariables|BYREF (variables)"}}==
16+
**{{fbdoc item="keyword" value="KeyPgByrefVariables|BYREF (variables)"}}**
1717
Used with ##[[KeyPgDim|Dim]]## or ##[[KeyPgStatic|Static]]## or ##[[KeyPgVar|Var]]## allows to declare references.
1818
>>
1919

doc/manual/cache/CompilerCmdLine.wakka

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Using the **fbc** command-line.
132132
=={{fbdoc item="keyword" value="CompilerOptcupp|-C"}}==
133133
Do not delete the object file(s)
134134
=={{fbdoc item="keyword" value="CompilerOptw|-w < value >"}}==
135-
Set min warning level: ##all##, ##pedantic##, ##next## or a value
135+
Set min warning level: ##all##, ##param##, ##escape##, ##pedantic##, ##next##, ##constness## or a value
136136
=={{fbdoc item="keyword" value="CompilerOptmaxerr|-maxerr < val >"}}==
137137
Only stop parsing if <val> errors occurred
138138
=={{fbdoc item="keyword" value="CompilerOptnoerrline|-noerrline"}}==

doc/manual/cache/CompilerOptw.wakka

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Set minimum warning level.
33

44
{{fbdoc item="syntax"}}##
5-
**-w** //level// | **all** | **param** | **escape** | **pedantic** | **next**
5+
**-w** //level// | **all** | **param** | **escape** | **pedantic** | **next** | **constness**
66
##
77
{{fbdoc item="param"}}
88
##//level//##
@@ -17,11 +17,13 @@ Set minimum warning level.
1717
Equivalent to specifying the ##**param**## and ##**escape**## arguments, plus length checking of parameters passed ##[[KeyPgByval|ByVal]]## and of any ##[[KeyPgCptr|Cptr]]## converting to pointer only.
1818
##**next**##
1919
Warn when ##[[KeyPgNext|Next]]## is followed by an identifier.
20+
##**constness**##
21+
Warn when ##[[KeyPgConstQualifier|CONST (Qualifier)]]## is discarded in an assignment.
2022

2123
{{fbdoc item="desc"}}
2224
The ##-w## compiler option determines which compiler warnings, if any, are output. Each possible warning is associated with a warning level, starting from zero (##0##) and increasing with the potential problems that may occur. A significantly high ##//level//## value will have the effect of suppressing all warning messages.
2325

24-
Note that the ##**param**##, ##**escape**##, ##**pedantic**## and ##**next**## arguments provide additional warnings not ordinarily output, even by default.
26+
Note that the ##**param**##, ##**escape**##, ##**pedantic**##, ##**next**## and ##**constness**## arguments provide additional warnings not ordinarily output, even by default.
2527

2628
If the ##**-w**## option is not specified, it's as if ##**-w 0**## was used. The ##**-w**## option can be specified multiple times.
2729

doc/manual/cache/GlossaryIndex.wakka

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Brief definitions and explanations for words and phrases used in the ""FreeBASIC
130130
Refers to the internal data structure used by the compiler and runtime library for managing variable length strings and arrays.
131131

132132
**destroy (TYPE or CLASS)**
133-
The act of deconstructing and deallocating memory for an object instance. When an object is destroyed, its destructor is called. This happens automatically when an object goes out of scope, or when ##[[KeyPgOpDelete|Delete]]## is called with a pointer to an object.
133+
The act of deconstructing and deallocating memory for an object instance. When an object is destroyed, its destructor is called. This happens automatically when an object goes out of scope, or when ##[[KeyPgOpDelete|Delete (Statement)]]## is called with a pointer to an object.
134134

135135
**destructor (module)**
136136
A special type of module-level procedure that is automatically called at program termination. See ##[[KeyPgModuleDestructor|Destructor (Module)]]##.

doc/manual/cache/KeyPgAllocate.wakka

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Allocates a block of memory from the free store
1717
{{fbdoc item="desc"}}
1818
Attempts to allocate, or reserve, ##//count//## number of bytes from the free store (heap). The newly allocated memory is not initialized.
1919

20-
As the initial value of newly allocated memory is unspecified, **Allocate** must not be directly used with ##[[KeyPgString|String]]## or ##[[KeyPgType|UDT]]## containing string, because the string descriptor being not cleared (containing random data), that may induce corrupted string or more (trying to write to a random place in memory or trying to deallocate a random pointer). It is mandatory in that case (with string or UDT containing string) to use ##[[KeyPgCallocate|Callocate]]## (clearing memory), or ##[[KeyPgOpNew|New]]## (calling constructor) in case of **UDT**, or at worst after **Allocate** to explicitly clear the descriptor (setting to 0) before the first string use.
20+
As the initial value of newly allocated memory is unspecified, **Allocate** must not be directly used with ##[[KeyPgString|String]]## or ##[[KeyPgType|UDT]]## containing string, because the string descriptor being not cleared (containing random data), that may induce corrupted string or more (trying to write to a random place in memory or trying to deallocate a random pointer). It is mandatory in that case (with string or UDT containing string) to use ##[[KeyPgCallocate|Callocate]]## (clearing memory), or ##[[KeyPgOpNew|New Expression]]## (calling constructor) in case of **UDT**, or at worst after **Allocate** to explicitly clear the descriptor (setting to 0) before the first string use.
2121

2222
The pointer that is returned is an [[KeyPgAny|any]] [[KeyPgPtr|ptr]] and points to the start of the allocated memory. This pointer is guaranteed to be unique, even if ##//count//## is zero.
2323

doc/manual/cache/KeyPgAny.wakka

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The ##**Any**## keyword is used as a placeholder for a type or value in various
4141

4242
Comparison to ""C/C++"": This matches the behavior of a variable declaration without initialization value in ""C/C++"".
4343

44-
Similar to **##Any##** initializers for variables, **##Any##** can also be used with the ##[[KeyPgOpNew|New]]## or ##[[KeyPgOpPlacementNew|Placement New]]## operators in order to leave the newly created object uninitialized (only allowed with data types that do not have constructors).
44+
Similar to **##Any##** initializers for variables, **##Any##** can also be used with the ##[[KeyPgOpNew|New Expression]]## or ##[[KeyPgOpPlacementNew|Placement New]]## operators in order to leave the newly created object uninitialized (only allowed with data types that do not have constructors).
4545

4646
- ""Instr/InstrRev"":
4747
**##Any##** can be used with ##[[KeyPgInstr|Instr]]## or ##[[KeyPgInstrrev|InstrRev]]## as a qualifier for the ##//substring//## parameter, to indicate that any individual character in it may be matched.

doc/manual/cache/KeyPgConstructor.wakka

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Called automatically when a class or user defined type is created
2424

2525
A constructor method is passed a hidden ##[[KeyPgThis|this]]## parameter having the same type as ##//typename//##. ##[[KeyPgThis|this]]## is optionally used to access the fields of the ##[[KeyPgType|Type]]## or ##[[KeyPgClass|Class]]## which is to be initialized in the ##**Constructor**## method.
2626

27-
Constructors are called when declaring global or local static instances of ##//typename//## and when allocating ##//typename//## dynamically using the ##[[KeyPgOpNew|New]]## operator. See examples below for different constructor syntaxes.
27+
Constructors are called when declaring global or local static instances of ##//typename//## and when allocating ##//typename//## dynamically using the ##[[KeyPgOpNew|New Expression]]## operator. See examples below for different constructor syntaxes.
2828

2929
A copy ##**Constructor**## is a special constructor that initializes a new object from an existing object. There are three general cases where the copy ##**Constructor**## is called: when instantiating one object and initializing it with another object (in one instruction), when passing an object by value, when an object is returned from a function by value (by using ##[[KeyPgReturn|Return]] //x//## statement).
3030
Note: When an object is returned from a function by value, but by using ##**Function** = //x//## (or ##//function_identifier// = //x//##) assignment, the ##**Constructor**## is called once at first, and then the ##[[KeyPgOpLet|Let (Assign)]]## operator at each assignment.
@@ -189,7 +189,7 @@ Sleep
189189
{{fbdoc item="see"}}
190190
- ##[[KeyPgClass|Class]]##
191191
- ##[[KeyPgModuleConstructor|Constructor (Module)]]##
192-
- ##[[KeyPgOpNew|New]]##
192+
- ##[[KeyPgOpNew|New Expression]]##
193193
- ##[[KeyPgDestructor|Destructor]]##
194194
- ##[[KeyPgType|Type]]##
195195
- [[ProPgDataConversion|Coercion and Conversion]]

0 commit comments

Comments
 (0)