Topic: APLX Help : Help on APL language : APL Primitives : ~ Without
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

~ Without


Two-argument form  See also Not

Without is used to remove items from a vector. Items in its left argument which are found in its right argument are removed from the result. When the arguments are nested, an exact match in data and structure must be found before an item is removed. The right argument can be of any shape of rank. This operation is affected by ⎕CT, the comparison tolerance.

             'ABCDEFGHIJKLMNOPQRSTUVWXYZ'~'AEIOU'
       BCDFGHJKLMNPQRSTVWXYZ         (Vowels removed)
             1 2 3 4 5 6 ~2 4 6
       1 3 5                         (Even numbers removed)
             'THIS   IS   TEXT'~' '
       THISISTEXT                    (Removal of blanks - see also ⎕DBR)
             A←'THIS' 'AND' 'THAT'   (Three element nested vector)
             A~'T'
       THIS AND THAT                 (No match for the single character T)
             A~'AND'
       THIS AND THAT                 (No match for the length three vector)
             A~⊂'AND'
       THIS THAT                     (Match found for nested scalar ⊂'AND')
             A~'TH' 'AND'
       THIS THAT

See also the other 'set' operations: Unique, Union and Intersection.


Topic: APLX Help : Help on APL language : APL Primitives : ~ Without
[ Previous | Next | Contents | Index | APL Home ]