Skip to content
Tcl Source Code View Ticket
Login

View Ticket

"expr" command does not support locale..

Closed / Invalid410728ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2001-03-23 08:14:36
"expr" command does not support locale where float 
digit uses comma instead of point
example: 3,23 instead of 3.23

If I use russian locale in my program linked with tcl 
library, I have errors in expr command, while 
executing tcl scripts.

for example:
[expr 21e-1]
returns
2,1.0

one more example:
[expr 2.1+2.1]
and
[expr 2,1+2,1]
both returns error

It is not good :)

I use RedHat Linux 7.0 with shipped Tcl/Tk 8.3


Andrey Paskal
hobbsplain2001-03-28 08:09:40
Logged In: YES 
user_id=72656

It is by very intentional design that Tcl requires all math 
operations operate in the C locale, and is likely to never 
change because it means tcl scripts wouldn't be portable 
from system to system.  You have to be sure that this is 
propagated in libraries that talk with Tcl.
dgp Ticket [410728ffff]: 4 changes [History diff]2001-03-28 23:38:43
dgp Ticket [410728ffff]: 4 changes [History diff]2001-04-06 02:48:03
Log in (anonymous is fine) to add a comment.