I know there is this function in one of the colin tree extension, but it uses double type, which has a limit.
And mine uses the BigDecimal, so theoretically it can be as much as the memory can handle.
Could you make it so that if the list contains characters like in the example instead of numbers the "do it message displays “expect numbers”. Now it is showing “empty-string” but that isn’t true. It gets a string but not the string it expects.
If you could add that that would be great. But it would get the same function as the compare text block it think. What i meant was that i would not expect an empty string message. I would like to see a message that would state that i have to use numbers when using the extension.
And don’t forget to make its size 16×16
Also i have some other suggestions:
1- make the extension’s blocks returns an int and not String.So We can use it in another blocks that require its input to be int.
2- Make your try-catch block inside the else condition here.So it doesn’t execute except there isn’t any error:
3- As @Peter said make the extension return something when an error occurred and not an empty string.Its better to return 0 or -1 for example so it can work with my first suggestion ( returning an int ) .