Anssi Sepp�l� <[EMAIL PROTECTED]> wrote:

> Yes, I have a number of dot <-> comma conversion utlities and J makes 
> it fine. But I think that the !. (fit) with ". might be a "pure J" 
> way to inform the decimal delimiter.  Like
>         ".!.','  '123,4'
> 123.4

Note that monadic ". performs J execution, and not numeric conversion.
If the above were to work, you would essentially be re-defining J's rhematic
rules, and opening a fairly large can of worms, for example:
  ".!.',' 'z =, x +/ , * y'

Even if this applied only to the dyad, there are quite a few localization issues
that you might want to address, rather than just one:
- decimal separator (normally '.' but sometimes ',')
- thousands separator (normally ',' but sometines '.')
- negative sign (normally '-' but possibly also '_')
- negative syntax (normally '-n' but possibly also 'n-', '(n)', etc.)
- positive sign (normally '+')
- exponent separator (normally one of 'dDeE')
- decimal digits (normally '0123456789' but other language like Arabic may use 
others)
- digit direction (some scripts place leading digits first, some last)

The wide variety of issues makes this localization much more appropriate
to be handled externally, in most cases by very simple translation verbs.

Since all of J's internals use one consistent internal format for
converting and displaying numbers, it is best to ALWAYS treat user data
formats as being distinct from internal formats (How many users want
to see negative numbers displayed with an _ sign character?)
 
-- Mark D. Niemiec <[EMAIL PROTECTED]>

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to