sorted LIST のなぞきょどうについて

set {_sortedKey::*} to indexes of {_areaIDs::*}
set {_sortedKey::*} to sorted {_sortedKey::*}
broadcast "%{_sortedKey::*}%"
set {_distance} to last element of {_sortedKey::*}
broadcast "%{_distance}%: %{_areaIDs::%{_distance}%}%"
set {_sortedKey::*} to indexes of {_areaIDs::*}
set {_sortedKey::*} to sorted {_sortedKey::*}
broadcast "%{_sortedKey::*}%"
set {_distance} to last element of {_sortedKey::*}
broadcast "%{_distance}%: %{_areaIDs::%{_distance}%}%"
87 201 178 74 142が入った{_sortedKey::*}において sortedしても、昇順になりません sortedしたlistの最後の要素を選ぶことで、 一番大きい数字を取ろうとしているのですが 今回は87が選ばれてます これって使い方間違ってたりするのでしょうか…
No description
6 Replies
月猫ch(月雲)
一方でこのように正しくsortされてることもあるのでよくわからんです
No description
soramame_256
soramame_2563y ago
多分indexesでとってるから文字列型になってる
月猫ch(月雲)
えぇ… parsed as numberすればいいんですかね…
soramame_256
soramame_2563y ago
多分おそらく
月猫ch(月雲)
できました! すげー…

Did you find this page helpful?