[Jprogramming] Problem working with data loaded from a file
Devon McCormick
devonmcc at gmail.com
Thu Mar 29 20:01:58 HKT 2012
This isn't true.
On Wed, Mar 28, 2012 at 5:44 PM, PackRat <packrat at anet.com> wrote:
...
> That second problem was that I forgot that one cannot use "=" as a
> Boolean comparison verb for literals (except for single characters).
...
"=" follows the same rules for characters as for other types. There
are also other comparison verbs.
vowels=. 'aeiou'
str=. 'Some random sentence'
str e. vowels
0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1
vowels =/ str
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
'om' E. str
0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
('om',:'en') E. str
|rank error
| ('om',:'en') E.str
('om',:'en') E."1 str
0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0
--
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
More information about the Programming
mailing list