View Issue Details
Note that this depending on mode is a global variable initialization which will be unsafe if your code runs multiple times.
If you are doing this for "always initialization" reasons, initialize in code, since in declaration initialization is ambiguous in FPC.
||As discussed on ML, Delphi does not allow this as well...|
||And Delphi documents it afaik, requiring loopvar to be "simple type".|
||Which is also wrong, it needs to be ordinal.|
||Sorry, simple variable.|
As far as I know, at some point Delphi developers wanted to prohibit the use of global variables for loops, but because of the old (simplest) code that used them, they accept it (backward compatibility), but began to issue a warning.
It is clear that for new code, where initialization is allowed at declaration, this exception is not supported (bad style is not supported).
FPC in this sense is compatible with Delphi.
|2019-09-11 15:57||Zaaphod||New Issue|
|2019-09-11 16:02||Marco van de Voort||Note Added: 0118036|
|2019-09-11 18:56||Bart Broersma||Note Added: 0118039|
|2019-09-11 21:07||Marco van de Voort||Note Added: 0118043|
|2019-09-13 10:43||Thaddy de Koning||Note Added: 0118058|
|2019-09-13 16:10||Marco van de Voort||Note Added: 0118063|
|2019-09-13 17:36||Serge Anvarov||Note Added: 0118064|