You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can work around it by writing (0 , 0), otherwise yes, the first element is parsed as the decimal0.0
Possible solutions:
require the space above, although that's ugly
require decimals to have at least a digit after the decimal separator. Not sure it's a good solution here, but that might be a good idea for the readability of the code anyways (e.g. always require the user to write 12,0 rather than 12, for the decimal twelve -- that's what I prefer to do in examples anyway). It remains fragile because (12,0) and (12, 0) then are valid syntax for completely different things (a decimal singleton a pair of integers, respectively)
change the separator in tuples to ;, making them closer in appearance to lists, but avoiding the clash with the french decimal separator
I would be in favor of keeping the current behavior as is but throwing out a warning in the parser if it detects in the French language an instance of LEFTPARENT NUMBER COMMA NUMBER RIGHTPAREN suggesting the user that they're mistaking the tuple for the decimal and showing the workarounds mentionned aboved. Do you think it's doable @AltGr?
Writing this tuple currently yields the error:
I can get around by let binding 0 to a variable but not very elegant.
The text was updated successfully, but these errors were encountered: