Forum > Suggestions

CASE statement with strings.

<< < (6/6)

Back in the day I proposed to implement this using prefix tree (or trie) instead (fastest, guaranteed O(n) where n is the query length), but it turns out generating code that calls AnsiCompareStr sequentially is much easier and the resulting code is smaller, too.


--- Quote from: Leledumbo on April 28, 2015, 07:27:49 am ---
--- Quote from: Blaazen on April 28, 2015, 01:45:19 am ---Hello, I guess you use

--- Code: ---{$mode delphi}
--- End code ---

It works here with FPC 3.1.1 and

--- Code: ---{$mode objfpc}
--- End code ---

--- End quote ---
It works in FPC/ObjFPC mode only. Delphi, TP, MacPas and ISO mode doesn't support it for compatibility.

--- End quote ---

Bringing up an old thread here... would it be possible to enable this in other modes using a $modeswitch maybe?


[0] Message Index

[*] Previous page

Go to full version