4

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.

  • 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? – smarx May 21 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>". – goodvibration May 22 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.