トピック
Keiren TobuKatsu

Does anyone know a method for a dictionary-similar thing? An array uses numbers to search, like ARRAY[50] and I've tried things like INPUT A:IF A==ARRAY[VARIABLE] THEN PRINT etc etc

That doesn't work. Is there any way to search like a dictionary? input soso -word 1 here 'word searched -word 2 here 'defenition etc
0そうだね
プレイ済み
返信[1]
親投稿
Kl'Dck Hul HissingToaster
I created a library for compile-time dictionaries called Lowerdash. smilebasicsource.com/page?pid=59 Like I said they are compile time, so you can't change the keys while your program is running. it might be possible to write a mutable DICT in future releases.
0そうだね
プレイ済み
返信[2]
親投稿
MIKI ifconfig
I asked the president Kobayashi, he told that such hash was on their TODO list.
0そうだね
未プレイ
返信[3]
親投稿
ĦHarry Ramstrong
A hash is usually done via CHECKSUM function. So, K=CHECKSUM("merringold") R=HASH[K] What I usually do, however, is just sort the array, and use binary search. OTOH, assuming all the keys fit in a string, you can just use the value return by INSTR() ^_-
0そうだね
プレイ済み