I already tried that. End result is
registryextended.pas(260,18) Error: Ordinal expression expected
On the line containing "case aRoot of" , where aRoot is of type string.
Maybe there is a compiler directive i don't know of that will make FPC "happy". So for now, this is how it works.
And i really don't want to get into wishlist given on that link, i work with IDE i got right now. Lazarus/FPC combo being a free alternative to Delphi with near complete feature set (there is always room for more) it is an offer hardly anyone can refuse.
var
CorNor : String;
case AnsiIndexStr(UpperCase(CorNor), ['BLACK','WHITE','MAGENTA','RED','GREEN','BLUE','YELLOW']) of
0 : ShowMessage('1');
1 : ShowMessage('2');
2 : ShowMessage('3');
3 : ShowMessage('4');
4 : ShowMessage('5');
5 : ShowMessage('6');
6 : ShowMessage('7');
end;