REDEBOLT
03-09-2011, 08:54
Hi,
When I run the following code, I get an error screen:
' Empty GUI script created on 09-03-2011 01:38:16 by Robert E. DeBolt (ThinAIR)
Uses "dictionary", "console"
Dim pDict As Long '---Pointer to dictionary
Dim counter As Long
Dim nInfo As Number
pDict = Dictionary_Create(1000000, %TRUE)
For counter = 1 To 100000
Dictionary_Add(pDict, counter, String$(100, Counter))
Next
'MsgBox 0, "Add OK"
PrintL "Data key = 1000 is: " & LEFT$(Dictionary_Find(pDict, 62),10) & " ..."
'MsgBox 0, "Data key = 1000 is: " & LEFT$(Dictionary_Find(pDict, 62),10) & " ..."
nInfo = Dictionary_MemInfo(pDict, %HT_MemInfo_Keys)
PrintL "%HT_MemInfo_Total = " + nInfo
Dictionary_Free(pDict)
WaitKey
Regards,
Bob
When I run the following code, I get an error screen:
' Empty GUI script created on 09-03-2011 01:38:16 by Robert E. DeBolt (ThinAIR)
Uses "dictionary", "console"
Dim pDict As Long '---Pointer to dictionary
Dim counter As Long
Dim nInfo As Number
pDict = Dictionary_Create(1000000, %TRUE)
For counter = 1 To 100000
Dictionary_Add(pDict, counter, String$(100, Counter))
Next
'MsgBox 0, "Add OK"
PrintL "Data key = 1000 is: " & LEFT$(Dictionary_Find(pDict, 62),10) & " ..."
'MsgBox 0, "Data key = 1000 is: " & LEFT$(Dictionary_Find(pDict, 62),10) & " ..."
nInfo = Dictionary_MemInfo(pDict, %HT_MemInfo_Keys)
PrintL "%HT_MemInfo_Total = " + nInfo
Dictionary_Free(pDict)
WaitKey
Regards,
Bob