@Marcov: I really don't want to remind you (especially when in grumpy mode
) that there is a modeswitch at least for the @-dereferencing ...
[edit]Maybe the Sparta-examples can be moved to the Examples-Directory that way they are found so there are less questions about a wiki that also woud be a good thing ... (Pascal +2 f.m.)
... and if you want to do me a favor use my version: (
https://github.com/joecare99/Public/tree/master/Examples/Source/Sparta * (the units)
and
https://github.com/joecare99/Public/tree/master/Examples/FPC T*.lp* (The Project-files)
and
https://github.com/joecare99/Public/tree/master/Examples Sparta_ex.lpg (The Project-Group)
)
@Pascal: if you don't want to wait for rtl-generics use sparta-generics which is already shipped with the current version.
BTW: The Sparta-Generics-Examples work (and don't work) with both sparta & rtl except one (THashMapCaseInsensitive) that compiles but throws an Exception
Working with case insensitive THashMap
Add Cat and Dog
An unhandled exception occurred at $000000010002F744:
EAccessViolation: Access violation
$000000010002F744 line 3230 of generics.defaults.pas
$0000000100018218 line 1275 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$000000010001950F line 1429 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000172F6 line 44 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000016D3 line 10 of THashMapCaseInsensitive.lpr
$00000001000016E6
$0000000100012203
$0000000100012D31
$00007FF9166F8364
$00007FF9169A70D1
Heap dump by heaptrc unit
109 memory blocks allocated : 8528/8752
98 memory blocks freed : 7456/7680
11 unfreed memory blocks : 1072
True heap size : 524288 (192 used in System startup)
True free heap : 521376
Should be : 521616
Call trace for block $00000000000EFBE0 size 40
$000000010000D1FB
$0000000100012722
$000000010001282C
$00007FF9169EAB9D
$00007FF916989913
$00007FF9169E9CBA
$000000010002F744 line 3230 of generics.defaults.pas
Call trace for block $0000000000104F70 size 128
$0000000100014186
$000000010000D1DB
$0000000100012497
$0000000100012706
$000000010001282C
$00007FF9169EAB9D
$00007FF916989913
Call trace for block $000000000015CFD0 size 176
$000000010000D162
$000000010000A657
$00000001000505AA
$0000000100052D6C
$00000001000126D7
$000000010001282C
$00007FF9169EAB9D
Call trace for block $00000000000FD380 size 80
$000000010000D162
$000000010000A062
$0000000100018054 line 1322 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000194E3 line 1427 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000172F6 line 44 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000016D3 line 10 of THashMapCaseInsensitive.lpr
$00000001000016E6
Call trace for block $00000000000FD2A0 size 80
$000000010000D162
$000000010000A062
$0000000100018054 line 1322 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000194E3 line 1427 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000172F6 line 44 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000016D3 line 10 of THashMapCaseInsensitive.lpr
$00000001000016E6
Call trace for block $00000000000FD1C0 size 80
$000000010000D162
$000000010000A062
$0000000100018054 line 1322 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000194E3 line 1427 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000172F6 line 44 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000016D3 line 10 of THashMapCaseInsensitive.lpr
$00000001000016E6
Call trace for block $00000000000FD0E0 size 80
$000000010000D162
$000000010000A062
$0000000100018054 line 1322 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000194E3 line 1427 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000172F6 line 44 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000016D3 line 10 of THashMapCaseInsensitive.lpr
$00000001000016E6
Call trace for block $000000000010D060 size 104
$000000010000D162
$000000010000A657
$000000010001ECED line 65 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$0000000100019066 line 1196 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000191AA line 1214 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000172A5 line 41 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000016D3 line 10 of THashMapCaseInsensitive.lpr
Call trace for block $00000000000EFA60 size 48
$000000010000D162
$000000010000A657
$000000010001C7B5 line 647 of generics.collections.pas
$0000000100017A3B line 1148 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$000000010001BBBD line 71 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$000000010001BAB2 line 66 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$0000000100019040 line 1195 of ../Source/Sparta/uHashMapCaseInsensitive.pas
Call trace for block $000000000010CF60 size 104
$000000010000D162
$000000010000A657
$000000010001BA7D line 65 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$0000000100019040 line 1195 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000191AA line 1214 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000172A5 line 41 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000016D3 line 10 of THashMapCaseInsensitive.lpr
Call trace for block $000000000015CE90 size 152
$000000010000D162
$000000010000A657
$0000000100019171 line 1213 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000172A5 line 41 of ../Source/Sparta/uHashMapCaseInsensitive.pas
$00000001000016D3 line 10 of THashMapCaseInsensitive.lpr
$00000001000016E6
$0000000100012203