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 windowDefined items
Name Class Description TAB Noun tab character LF Noun linefeed character FF Noun formfeed character CR Noun carriage return character CRLF Noun CR LF pair EAV Noun ascii 255 character noun Noun integer 0 adverb Noun integer 1 conjunction Noun integer 2 verb Noun integer 3 monad Noun integer 3 dyad Noun integer 4 def Conj : (explicit definition) define Adv : 0 (explicit definition script form) do Verb name for ". drop Verb name for }. each Adv each (&.>) every Adv every (&>) inverse Adv inverse (^:_1) fetch Verb name for {:: leaf Adv leaf (L:0) nameclass Verb name for 4!:0 nc Verb name for 4!:0 namelist Verb name for 4!:1 on Conj name for @: pick Verb pick (>@{) rows Adv rows ("1) script Verb load script, name for 0!:0 scriptd Verb load script with display, name for 0!:1 sign Adv sign (*) sort Verb sort up take Verb name for {. assert Verb assert value is true bind Conj binds argument to a monadic verb boxopen Verb box argument if open boxxopen Verb box argument if open and 0<# bx Verb indices of 1's in boolean clear Verb clear all names in locale cutopen Verb cut argument if open datatype Verb noun datatype empty Verb return empty result (i.0 0) erase Verb erase namelist expand Verb boolean expand list Verb list data formatted in columns nl Verb selective namelist names Verb formatted namelist smoutput Verb output to session split Verb split head from tail table Adv function table tolower Verb convert text to lower case toupper Verb convert text to upper case type Verb object type toHOST Verb converts character strings to Host delimiter toJ Verb converts character strings to J delimiter (linefeed) wcsize Verb size of execution window
assertion failure if 0 e. y. e.g. 'invalid age' assert 0 <: age
binds monadic verb to an argument creating a new verb that ignores its argument. e.g. fini=: wdinfo bind 'finished...'
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.
returns any names not erased also clears LOADED_j_ example: clear 'myloc'
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'
form: boolean expand data
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
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'
examples: split 'abcde' 2 split 'abcde'
table - function table (adverb) e.g. 1 2 3 * table 10 11 12 13 +. table i.13
system\main\stdlib.ijs | Release: 4.02/1998-11-13/12:26 |