str2num problems with regional settings

str2num problems with regional settings - Messaggi

#1 Pubblicato: 03/10/2012 12:48:43
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

Hi

str2num has problems with nonstandard settings of decimal delimiter (komma) and function argument delimiter (semicolon). The error message indicates that the function tries to convert the internal argument separator (komma) to periods.

Best regards, Martin Kraska

Edit: Seems that the bug has been fixed:
[MATH lang=ENG]str2num(num2str(sys(1.2,2,2,1)))=sys(1.2,2,2,1)[/MATH]
str2num.sm (2,18 KiB) scaricato 1444 volta(e).
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#2 Pubblicato: 12/10/2012 03:43:26
Davide Carpi

Davide Carpi

1.443 apprezzamenti in 2.936 post.

Gruppo: Moderator

Another issue with regional settings.

When a variable name or a function name created using default settings (decimals->period,separator->comma) contains a semicolon (maybe in the subscript or not), opening the file with different settings (decimals->comma,separator->semicolon) cause an "empty stack" error (and the file can't be opened).


regards,

w3b5urf3r
semicolon_bug.sm (1,24 KiB) scaricato 1414 volta(e).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Pubblicato: 27/05/2013 06:26:06
Davide Carpi

Davide Carpi

1.443 apprezzamenti in 2.936 post.

Gruppo: Moderator

Wrote

Another issue with regional settings.

When a variable name or a function name created using default settings (decimals->period,separator->comma) contains a semicolon (maybe in the subscript or not), opening the file with different settings (decimals->comma,separator->semicolon) cause an "empty stack" error (and the file can't be opened).


regards,

w3b5urf3r



No chances to fix this? It's critical when sharing worksheets based on norms like Eurocodes or similars...


best regards,

w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 utenti hanno apprezzato questo post
ioan92 27/05/2013 17:01:00
#4 Pubblicato: 29/05/2013 15:11:38
Andrey Ivashov

Andrey Ivashov

2.343 apprezzamenti in 4.056 post.

Gruppo: Super Administrator

I see the only way to fix it is to forbid semicolon symbol in variables/functions names. I'll do it.
I think instead I need to implement some common way to allow any characters to be used in names. But a bit later...

Best regards, Andrey Ivashov.
1 utenti hanno apprezzato questo post
ioan92 29/05/2013 15:53:00
#5 Pubblicato: 29/05/2013 16:37:49
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

Wrote


I think instead I need to implement some common way to allow any characters to be used in names.
Best regards, Andrey Ivashov.



One of the most missed characters is the % sign (as a unit name, '%:0,01), in order to avoid ugly constructs like in the attachment.
prozent1.png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1 utenti hanno apprezzato questo post
Andrey Ivashov 31/05/2013 00:48:00
#6 Pubblicato: 29/05/2013 16:58:48
Davide Carpi

Davide Carpi

1.443 apprezzamenti in 2.936 post.

Gruppo: Moderator

Wrote

I see the only way to fix it is to forbid semicolon symbol in variables/functions names. I'll do it.
I think instead I need to implement some common way to allow any characters to be used in names. But a bit later...

Best regards, Andrey Ivashov.



mhhh... ok... I know, dot, comma and semicolon are special and sensible characters....
There are some unicode characters very similar ‚ ; I don't know if could be useful for the development of these exceptions (as dirty idea when an user is typing the name of the variable/function, Smath can convert "on the fly" the keyboard comma and semicolon input into this characters...)


thank you for any your effort

w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 utenti hanno apprezzato questo post
Andrey Ivashov 31/05/2013 00:48:00
  • Nuovi post
  • Nessun nuovo post