Re: [fpc-devel] Dangerous optimization in CASE..OF

2017-07-03 Thread Martok
Good morning! Am 02.07.2017 um 22:02 schrieb Florian Klämpfl: > Am 02.07.2017 um 21:40 schrieb Martok: >> Honestly, I still don't understand why we're even having this discussion. > > Because it is a fundamental question: if there is any defined behavior > possible if a variable > contains an

Re: [fpc-devel] Dangerous optimization in CASE..OF

2017-07-03 Thread Michael Van Canneyt
On Sun, 2 Jul 2017, Tomas Hajny wrote: By using file of enum (or any data type), you are explicitly telling the compiler it is OK. There isn't much difference between telling the compiler that all values in certain file are of certain type and telling the compiler that the next value read

[fpc-devel] A question about CASE OF

2017-07-03 Thread Ched
Hello All, Just... one question. Are the items in the CASE OF statement tested linearly until one test reveals true (or if none, execute the else condition if any) or there is some mechanism of localization like in a sorted binary tree. Linearly: the item with a high probability are to be