The input issue between dictionary
Posted: 20 Aug 2018, 21:07
Hi Guys
Today I met a problem.
If you try to using "Input" command to retrieve the user input.
The command always treat "0 to 9"(digits) as "Integer".
You can check it with
and if you try to use the output(digits) for a dictionary, that's definitely won't work.
e.g.
so I try to solve this problem by some trick.
Try to fool the interpreter force to convert Integer into String.
1. Not work
2. Not work
3. Not work
...all of those methods just not working.
Is it possible solve this cleanly?
Today I met a problem.
If you try to using "Input" command to retrieve the user input.
The command always treat "0 to 9"(digits) as "Integer".
You can check it with
Code: Select all
Input,foo,L1
if foo is integer
ToolTip ...it's an integer
e.g.
Code: Select all
dict = {}
dict.Insert("1", "foo")
Input,uin,L1
ToolTip dict[uin] ; It's same as dict[1], not dict["1"]
Try to fool the interpreter force to convert Integer into String.
1. Not work
Code: Select all
Input,uin,L1
uin := uin ""
Code: Select all
Input,uin,L1
uin := uin . ""
Code: Select all
Input,uin,L1
uin := uin " "
StringTrimRight,uin,uin,1
Is it possible solve this cleanly?