monkey.boxes
Monkey Forums/Monkey Programming/monkey.boxes
| ||
Hi, I am trying to covert a value type (string) to an integer using monkey.boxes ToInt(). So far I'm lost on how to do this. I understand the concept I just don't know how to implement it. So for example this is how I thought it might work but does not. Local mystring:StringObject Print mystring.ToInt() Lost I am. :) |
| ||
Any reason you need to box these values to cast them? Try casting a string directly:Local myString:String = "16" DrawCircle( x,y, Int(myString)) 'Last value explicitly casts myString to Int. If it fails, the cast returns 0. This will fail on decimal values! |
| ||
^There is none. :) I did not know that Monkey did that. Thanks I think that will do fine. |
| ||
I'd recommend avoiding monkey.boxes - it's a bit of a relic from an earlier version of monkey. |
| ||
^10-4 good-buddy ;) |