Hello,
I've been checking out the MapCreate function, but not having much luck.
From the help file, if I run Example 1, or Example 2
Example 1:
Pairs = 'Apples,0':@tab:'Oranges,0':@tab:'Pears,0'
Fruit = MapCreate(Pairs)
; Count an apple.
Fruit["apples"] += 1
I get an error ArrDimension: Unable to allocate or lock memory.
I'm on the latest version: 2020A Jan 8, 2020
Thanks!
Barry
I would imagine that you are running the example using WinBatch Studio's debugger. Running the example outside the debugger works just fine. However, the debugger is known to cause problems with WIL maps. Until the next release, you will have to play with WIL maps outside the debugger.
Thanks for reporting the problem.
While staring mindlessly out the window I realized I should have mentioned a workaround that allows you to use maps in the debugger. All you need is the top secret IntControl 100
IntControl(100, 64,0,0,0)
Pairs = 'Apples,0':@tab:'Oranges,0':@tab:'Pears,0'
Fruit = MapCreate(Pairs)
; Count an apple.
Fruit["apples"] += 1
[edit]
The link to IntControl 100 documenation:
https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/IntControl_100.htm (https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/IntControl_100.htm)
lol, thanks!