7

So when I try to put in three numbers as a String in a usual setter-method, it doesn't work. Does anybody know why?

function test(string memory x) public view returns(string memory){
    return x;

}

When I try: "1,2,3" I get an JSON Error, but when I try: "a,b,c" it does work perfect.

2
  • 3
    I can confirm this behavior. I'd say it's a bug in Remix. I've seen a few bugs like this in the parameter parsing. Usually I can find a workaround syntax, but this time I'm stumped. File a bug?
    – user19510
    Commented May 21, 2019 at 20:29
  • A more general string which causes the problem is "<a string of any characters except comma>,<a string of numeric characters only>,<a string of any characters>". Commented May 22, 2019 at 6:03

1 Answer 1

0

Using "12,34" in REMIX IDE desktop mac version works. Using 12,34 however doesn't (as it should). I believe this bug has been fixed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.