[副本] map2data

楼主: laechan (挥泪斩马云)   2014-04-19 17:44:57
justin 我看你已经写好了,那因为你在断线状态,我补了一行
return map,用 running code 测试的结果如下:
tmp=@LONG
001-002 005-006
| | |
003-004 007
|
009-008
LONG
;
data="/std/new_ob/instance/instance_ob"->map2data(tmp);
write(identify(data)+"\n");
========== 程式执行区 ==========
([
"009" : ([ "east" : "008" ]),
"008" : ([ "west" : "009" ]), // 少了 north
"007" : ([ ]), // 少了 south north
"006" : ([ "west" : "005" ]), // 少了 south
"005" : ([ "east" : "006" ]), // 少了 south
"004" : ([ "west" : "003" ]), // 少了 north
"003" : ([ "east" : "004" ]), // 少了 north
"002" : ([ "west" : "001" ]), // 少了 south
"001" : ([ "east" : "002" ])
])
========== 程式执行区 ==========
这样可以看出大概的问题,你可以再检查一下,大抵上就是
map[t2]["north"] 跟 map[t2]["south"] 的判断完全没有执
行到,有执行到就会有资料,我加了 debug 行你可以参考
south 的判断字串: [ | | |][ ]
south 的判断字串: [ | | |][ | ]
south 的判断字串: [ | | |][ | ]
south 的判断字串: [ | | |][ |]
north 的判断字串: [ | | |][ | ]
south 的判断字串: [ |][ ]
north 的判断字串: [ | | |][ | ]
south 的判断字串: [ |][ ]
north 的判断字串: [ | | |][ |]
south 的判断字串: [ |][ |]
north 的判断字串: [ |][ ]
north 的判断字串: [ |][ |]
^^^^^^^^^^^^^^ ^^
t3 t3[a..b]
Laechan

Links booklink

Contact Us: admin [ a t ] ucptt.com