Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

What should I do to make the program equally understand the separator "dot" and "comma"?

Please login with a confirmed email address before reporting spam

I wrote a simple application with one input field. If I enter in the input box 1.0 (through dot) everything works. If I enter 1,0 (through comma), it gives an error (Syntax error in expression). Is it possible to somehow force the application to correctly read a number written with a comma?


1 Reply Last Post May 17, 2019, 2:04 p.m. EDT
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 5 years ago May 17, 2019, 2:04 p.m. EDT

Andrey,

you can use a string input, parse the string and put together the numerical value and then assign it to the numerical quantity you need. Requires some coding but should be doable, if it is worth the effort.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Andrey, you can use a string input, parse the string and put together the numerical value and then assign it to the numerical quantity you need. Requires some coding but should be doable, if it is worth the effort. Cheers Edgar

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.