View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0037771 | FPC | Documentation | public | 2020-09-18 14:36 | 2020-09-18 18:15 |
Reporter | 440bx | Assigned To | Michael Van Canneyt | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | all | OS | all | ||
Product Version | 3.3.1 | ||||
Fixed in Version | 3.3.1 | ||||
Summary | 0037771: incorrect statement in documentation regarding initialized variables | ||||
Description | The web page and, possibly one of the FPC manuals, states the following regarding initialized variables: "For constant records, each element of the record should be specified, in the form Field: Value, separated by semicolons, and surrounded by round brackets." This is not always the case since a construction such as: {$APPTYPE CONSOLE} {$MODE OBJFPC} type TArray = array[0..255] of Byte; procedure Test1; type TWrapper = record A: TArray; end; {$PUSH} {$WARN 3177 off : Some fields coming after "$1" were not initialized} const W: TWrapper = (); {$POP} begin Inc(W.A[0]); Writeln(W.A[0]); //Do something to change a value in W.A; { ***** resulting change must be preserved between calls to Test1 ***** } end; begin Test1; Test1; Readln; end. where the field of the record are _not_ specified in the declaration: const W: TWrapper = (); | ||||
Additional Information | See forum discussion in the thread https://forum.lazarus.freepascal.org/index.php/topic,51461.msg377813.html#msg377813 | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 1754 | ||||
FPCOldBugId | |||||
FPCTarget | 3.2.2 | ||||
Attached Files |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2020-09-18 14:36 | 440bx | New Issue | |
2020-09-18 14:36 | 440bx | Status | new => assigned |
2020-09-18 14:36 | 440bx | Assigned To | => Michael Van Canneyt |
2020-09-18 18:15 | Michael Van Canneyt | Status | assigned => resolved |
2020-09-18 18:15 | Michael Van Canneyt | Resolution | open => fixed |
2020-09-18 18:15 | Michael Van Canneyt | Fixed in Version | => 3.3.1 |
2020-09-18 18:15 | Michael Van Canneyt | Fixed in Revision | => 1754 |
2020-09-18 18:15 | Michael Van Canneyt | FPCTarget | => 3.2.2 |
2020-09-18 18:15 | Michael Van Canneyt | Note Added: 0125624 |