comparison isn't defined for characters.

Single characters can be compared thus:

   cle =: (-:/:~)@:,    NB. eg character-less-than-or-equal
NB. other comparisons are available!

   'a' cle 'v'
1
   'm' cle"0 'amv'
0 1 1

But this is chat, so you probably knew that!

Cheers,

Mike




On 09/12/2022 08:47, Jimmy Gauvin wrote:
Hi all,

testing character data for equality works fine but testing for relative
order does not.

    'a'<'v'

|domain error

|   'a'    <'v'

    'a'='v'

0

Is this explained somewhere ?

Thanks,

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

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

Reply via email to