STDLIB

standard J library (in z locale)

these definitions are assumed available to other programs

see winlib.ijs  for standard windows library
    jadelib.ijs for standard j library

TAB            tab
LF             linefeed
FF             formfeed
CR             carriage return
CRLF           CR LF pair
EAV            ascii 255
noun           0
adverb         1
conjunction    2
verb           3
monad          3
dyad           4

assert         assert value is true
bind           binds argument to a monadic verb
boxopen        box argument if open
boxxopen       box argument if open and 0<#
bx             indices of 1's in boolean
clear          clear all names in locale
clearall       clear all locales
cutopen        cut argument if open
datatype       noun datatype
def            : (explicit definition)
define         : 0 (explicit definition script form)
do             do (".)
drop           drop (}.)
each           each (&.>)
empty          return empty result
erase          erase
every          every (&>)
expand         boolean expand data
inverse        inverse (^:_1)
fetch          fetch ({::)
leaf           leaf (L:0)
list           list data formatted in columns
names          formatted namelist
nameclass      name class
namelist       name list
nc             name class
nl             selective namelist
on             on @:
pick           pick (>@{)
rows           rows ("1)
script         load script
scriptd        load script with display
sign           sign (*)
smoutput       output to session
sort           sort up
split          split head from tail
table          function table
take           take ({.)
toJ            converts character strings to J delimiter (linefeed)
toHOST         converts character strings to Host delimiter
tolower        convert text to lower case
toupper        convert text to upper case
type           object type
wcsize         size of execution window

Defined items
NameClassDescription
TABNountab character
LFNounlinefeed character
FFNounformfeed character
CRNouncarriage return character
CRLFNounCR LF pair
EAVNounascii 255 character
nounNouninteger 0
adverbNouninteger 1
conjunctionNouninteger 2
verbNouninteger 3
monadNouninteger 3
dyadNouninteger 4
defConj: (explicit definition)
defineAdv: 0 (explicit definition script form)
doVerbname for ".
dropVerbname for }.
eachAdveach (&.>)
everyAdvevery (&>)
inverseAdvinverse (^:_1)
fetchVerbname for {::
leafAdvleaf (L:0)
nameclassVerbname for 4!:0
ncVerbname for 4!:0
namelistVerbname for 4!:1
onConjname for @:
pickVerbpick (>@{)
rowsAdvrows ("1)
scriptVerbload script, name for 0!:0
scriptdVerbload script with display, name for 0!:1
signAdvsign (*)
sortVerbsort up
takeVerbname for {.
assertVerbassert value is true
bindConjbinds argument to a monadic verb
boxopenVerbbox argument if open
boxxopenVerbbox argument if open and 0<#
bxVerbindices of 1's in boolean
clearVerbclear all names in locale
cutopenVerbcut argument if open
datatypeVerbnoun datatype
emptyVerbreturn empty result (i.0 0)
eraseVerberase namelist
expandVerbboolean expand
listVerblist data formatted in columns
nlVerbselective namelist
namesVerbformatted namelist
smoutputVerboutput to session
splitVerbsplit head from tail
tableAdvfunction table
tolowerVerbconvert text to lower case
toupperVerbconvert text to upper case
typeVerbobject type
toHOSTVerbconverts character strings to Host delimiter
toJVerbconverts character strings to J delimiter (linefeed)
wcsizeVerbsize of execution window

TAB................. (n) tab character

LF.................. (n) linefeed character

FF.................. (n) formfeed character

CR.................. (n) carriage return character

CRLF................ (n) CR LF pair

EAV................. (n) ascii 255 character

noun................ (n) integer 0

adverb.............. (n) integer 1

conjunction......... (n) integer 2

verb................ (n) integer 3

monad............... (n) integer 3

dyad................ (n) integer 4

def................. (c) : (explicit definition)

define.............. (a) : 0 (explicit definition script form)

do.................. (v) name for ".

drop................ (v) name for }.

each................ (a) each (&.>)

every............... (a) every (&>)

inverse............. (a) inverse (^:_1)

fetch............... (v) name for {::

leaf................ (a) leaf (L:0)

nameclass........... (v) name for 4!:0

nc.................. (v) name for 4!:0

namelist............ (v) name for 4!:1

on.................. (c) name for @:

pick................ (v) pick (>@{)

rows................ (a) rows ("1)

script.............. (v) load script, name for 0!:0

scriptd............. (v) load script with display, name for 0!:1

sign................ (a) sign (*)

sort................ (v) sort up

take................ (v) name for {.

assert.............. (v) assert value is true

assertion failure if  0 e. y.
e.g. 'invalid age' assert 0 <: age

bind................ (c) binds argument to a monadic verb

binds monadic verb to an argument creating a new verb
that ignores its argument.
e.g.  fini=: wdinfo bind 'finished...'

boxopen............. (v) box argument if open

boxxopen    - box argument if open and # is not zero
e.g. if script=: 0!:0 @ boxopen, then either
  script 'work.ijs'  or  script <'work.ijs'
use cutopen to allow multiple arguments.

boxxopen............ (v) box argument if open and 0<#

bx.................. (v) indices of 1's in boolean

clear............... (v) clear all names in locale

        returns any names not erased
        also clears LOADED_j_
example: clear 'myloc'

cutopen............. (v) cut argument if open

this allows an open argument to be given where a boxed list is required.
most common situations are handled. it is similar to boxopen, except
allowing multiple arguments in the character string.

x. is optional delimiters, default LF if in y., else blank
y. is boxed or an open character array.

if y. is boxed it is returned unchanged, otherwise:
if y. has rank 2 or more, the boxed major cells are returned
if y. has rank 0 or 1, it is cut on delimiters in given in x., or
  if x. not given, LF if in y. else blank. Empty items are deleted.

 e.g. if script=: 0!:0 @ cutopen, then
  script 'work.ijs util.ijs'

datatype............ (v) noun datatype

empty............... (v) return empty result (i.0 0)

erase............... (v) erase namelist

expand.............. (v) boolean expand

form: boolean expand data

list................ (v) list data formatted in columns

syntax:   {width} list data
accepts data as one of:
  boxed list
  character vector, delimited by CR, LF or CRLF; or by ' '
  character matrix
formats in given width, default screenwidth

nl.................. (v) selective namelist

Form:  [mp] nl sel

  sel:  one or more integer name classes, or a name list.
        if empty use: 0 1 2 3.
  mp:   optional matching pattern. If mp contains '*', list names
        containing mp, otherwise list names starting mp. If mp
        contains '~', list names that do not match.

 e.g. 'f' nl 3      - list verbs that begin with 'f'
      '*com nl ''   - list names containing 'com'

names............... (v) formatted namelist

smoutput............ (v) output to session

split............... (v) split head from tail

examples:
   split 'abcde'
   2 split 'abcde'

table............... (a) function table

table   - function table  (adverb)
e.g.   1 2 3 * table 10 11 12 13
       +. table i.13

tolower............. (v) convert text to lower case

toupper............. (v) convert text to upper case

type................ (v) object type

toHOST.............. (v) converts character strings to Host delimiter

toJ................. (v) converts character strings to J delimiter (linefeed)

wcsize.............. (v) size of execution window


system\main\stdlib.ijsRelease: 4.02/1998-11-13/12:26