J Scripts Contents

J Script Doc

system\classes\dict
jndict | Dictionary where keys are numbers
jwdict | Dictionary where keys are words (actually J tokens)
jzdict | dictionary - see system\classes\dict\dict.txt
system\classes\dir
jdirs built from project: source\main\dirs\dirs
system\classes\graph
graph | loads jzgraph and defines cover verbs in z locale
jzgraph | built from project: source\graphics\graph\graph
system\classes\grid
jfgrid | built from project: source\grid\report\report
jfreport | provides jfreport form
jsgrid | select grid class
jtable | provides jtable form
jtgrid | watch grid class
jvgrid | built from project: source\grid\vgrid\vgrid
jwatch | watch grid class
jwgrid | built from project: source\grid\wgrid\wgrid
jzgrid | base grid class
system\classes\input
jinput | built from project: source\main\input\input
jpwd | built from project: source\classes\pwd\pwd
jselect | built from project: source\main\select\select
system\classes\opengl
jzopengl | base opengl class
opengl | loads the jzopengl class
system\classes\plot
jzplot | base plot class
plot | session definitions for plot
plotdefs | plot defaults
system\classes\view
jsview | built from project: source\grid\sview\sview
jview | built from project: source\main\view\view
system\extras\util
jpm | built from project: source\extras\pm\pm\source\extras\pm\pm
scriptdoc | built from project: source\main\script\script
system\main
colib | class/object library
compare | comparison utilities
convert | conversion utilities
dates | date and time utilities
dd | data driver utilities
debug | debug definitions and utilities
dir | directory utilities
dll | utilities for calling DLLs (dynamic link libraries)
files | file access utilities
format | formatting utilities
gl2 | 2D graphics definitions
gl3 | 3D graphics definitions
jadelib | Standard jade library (in j locale)
jmf | built from project: source\api\mapped\mapped
loadlib | script load library (in j locale)
misc | miscellaneous utilities
myutil | example scripts for user definitions
numeric | numeric utilities
pack | package utilities
parts | partition functions
regex | built from project: source\api\regex\regex
socket | built from project: source\api\winsock\winsock
stdlib | standard J library (in z locale)
strings | string manipulation
text | text utilities
trig | trigonometric functions
validate | data validation
winlib | standard windows library
system\packages\color
color16 | table of 16 primary colors supported by HTML
colortab | main colortable used in J
system\packages\files
csv | read/write comma-separated value data (*.csv) files
jfiles | Component File definitions
keyfiles | Keyed-file definitions
kfiles | Keyed-file definitions
nfiles | file read/write in various formats
system\packages\graphics
isigraph loads all isigraph files
system\packages\odbc
odbc built from project: source\api\odbc\odbc
system\packages\print
laserjet | LaserJet utilities
print | print package
write | write package
system\packages\publish
publish Publish J code to HTML
system\packages\stats
stats load statistics files
system\packages\winapi
menu | built from project: source\api\menu\menu
winapi | built from project: source\api\api\api


JNDICT

Dictionary where keys are numbers

see system\classes\dict\dict.txt

Defined items
Name Class Description

system\classes\dict\jndict.ijs Release: 4.05/2000-12-01/10:35


JWDICT

Dictionary where keys are words (actually J tokens)

see system\classes\dict\dict.txt

Defined items
Name Class Description

system\classes\dict\jwdict.ijs Release: 4.05/2000-12-01/10:35


JZDICT

dictionary - see system\classes\dict\dict.txt

Methods:
allkv           return all keys and values
clear           clear entries in dictionary
delete          delete keys
destroy         destroy dictionary
exporttofile    write dictionary to file
get             return values for given keys
getfill         return the fill value
getkv           return keys and values for given keys
hasvalues       return keys having given values
importfromfile  read dictionary from file
includes        checks for keywords in dictionary
isempty         return 1 if dictionary is empty
putkv           replace keys and values into dictionary
setfill         set the fill value
size            returns number of entries in dictionary

Methods:
deletep         permissive delete keys
exporttofilep   permissive write dictionary to file
getp            permissive return values (or fill element) for given keys
getkvp          permissive return keys and values for given keys
importfromfilep permissive read dictionary from file
putkvp          permissive append or replace keys and values into dictionary

Defined items
Name | Class | Description
allkv | Verb | return all keys and values
clear | Verb | clear entries in dictionary
create | Verb | create dictionary
delete | Verb | delete keys
destroy | Verb | destroy dictionary
exporttofile | Verb | write dictionary to file
get | Verb | return values for given keys
getfill | Verb | return the fill value
getkv | Verb | return keys and values for given keys
hasvalues | Verb | return keys with given values
importfromfile | Verb | read dictionary from file
includes | Verb | checks for keywords in dictionary
isempty | Verb | return 1 if dictionary is empty
putkv | Verb | put keys and values into dictionary
setfill | Verb | set the fill value
size | Verb | returns number of entries in dictionary

allkv............... (v) return all keys and values

clear............... (v) clear entries in dictionary

doesn't clear the fill element

create.............. (v) create dictionary

delete.............. (v) delete keys

permissive delete__d ('key0';'key1';'key2')
permissive=0 only delete keys that exist, else error
           1 delete keys
return: boolean mask of keys deleted

destroy............. (v) destroy dictionary

default destroy

exporttofile........ (v) write dictionary to file

permissive exporttofile filename
permissive=0 don't overwrite non-empty file
           1 can overwrite non-empty file
return: filename

get................. (v) return values for given keys

permissive get__d ('key0';'key1';'key2')
permissive=0 only return values for  keys that exist, else error
           1 return values for keys that exist, else fill element
return: values

getfill............. (v) return the fill value

getkv............... (v) return keys and values for given keys

permissive getkv__d ('key0';'key1';'key2')
permissive=0 only return keys+values for keys that exist, else error
           1 return keys+values, missing keys have value <fill>
form: getkv__d ('key0';'key1';'key2')
return: keys ; values

hasvalues........... (v) return keys with given values

importfromfile...... (v) read dictionary from file

permissive importfromfile filename
permissive=0 error if dictionary is non-empty
           1 allow replace of non-empty dictionary
return: filename
see exporttofile

includes............ (v) checks for keywords in dictionary

includes__d ('key0';'key1';'key2')
return: boolean key_found mask

isempty............. (v) return 1 if dictionary is empty

putkv............... (v) put keys and values into dictionary

permissive putkv__d ('key0';'key1';'key2');value0;value1;value2
permissive=0 only replace existing keys, error if key not found
           1 replace or append as necessary
return: boolean was_updated mask (may be zero if multiple replaces attempted)

setfill............. (v) set the fill value

size................ (v) returns number of entries in dictionary

system\classes\dict\jzdict.ijs Release: 4.05/2000-12-01/10:35


JDIRS

built from project: source\main\dirs\dirs

Defined items
Name Class Description

system\classes\dir\jdirs.ijs Release: 4.05/2000-12-01/10:35


GRAPH

loads jzgraph and defines cover verbs in z locale

also defines 16 standard color names in uppercase

Defined items
Name Class Description

system\classes\graph\graph.ijs Release: 4.05/2000-12-01/10:35


JZGRAPH

built from project: source\graphics\graph\graph

Defined items
Name  | Class  | Description
gdpencolor  | Verb  | set color for pen

pmapmode  | Verb  | set mapping mode (ani = 1 or iso = 0)

ppen  | Verb  | set pen

pshow  | Verb  | show graph window

psize  | Verb  | size graph window

gdpencolor.......... (v) set color for pen

form: gdcolor color[;style]

pmapmode............ (v) set mapping mode (ani = 1 or iso = 0)

ppen................ (v) set pen

pshow............... (v) show graph window

psize............... (v) size graph window

system\classes\graph\jzgraph.ijs Release: 4.05/2000-12-01/10:35


JFGRID

built from project: source\grid\report\report

Defined items
Name Class Description

system\classes\grid\jfgrid.ijs Release: 4.05/2000-12-01/10:35


JFREPORT

provides jfreport form

Defined items
Name Class Description

system\classes\grid\jfreport.ijs Release: 4.05/2000-12-01/10:35


JSGRID

select grid class

built from project: source\grid\sgrid\sgrid

Defined items
Name Class Description

system\classes\grid\jsgrid.ijs Release: 4.05/2000-12-01/10:35


JTABLE

provides jtable form

Defined items
Name Class Description

system\classes\grid\jtable.ijs Release: 4.05/2000-12-01/10:35


JTGRID

watch grid class

built from project: source\grid\table\table

Defined items
Name Class Description

system\classes\grid\jtgrid.ijs Release: 4.05/2000-12-01/10:35


JVGRID

built from project: source\grid\vgrid\vgrid

Defined items
Name Class Description

system\classes\grid\jvgrid.ijs Release: 4.05/2000-12-01/10:35


JWATCH

watch grid class

built from project: source\grid\watch\watch

Defined items
Name Class Description

system\classes\grid\jwatch.ijs Release: 4.05/2000-12-01/10:35


JWGRID

built from project: source\grid\wgrid\wgrid

Defined items
Name  | Class  | Description
clipfmt  | Verb  | format data for clipboard

clipunfmt  | Verb  | unformat data read from clipboard

create  | Verb  | grid

refresh  | Verb  | refresh display

clipfmt............. (v) format data for clipboard

format array of rank 0 1 or 2 for clipboard.
columns are separated by TAB, rows by CRLF.

clipunfmt........... (v) unformat data read from clipboard

returns boxed matrix from clipboard result,
recognizing TAB and CRLF as separators.
characters are not converted to numbers.
note this is not a true inverse of clipfmt.
e.g. try:  clipunfmt clipfmt i.5 6

create.............. (v) grid

refresh............. (v) refresh display

system\classes\grid\jwgrid.ijs Release: 4.05/2000-12-01/10:35


JZGRID

base grid class

built from project: source\grid\grid\grid

Defined items
Name Class Description

system\classes\grid\jzgrid.ijs Release: 4.05/2000-12-01/10:35


JINPUT

built from project: source\main\input\input

Defined items
Name  | Class  | Description
create  | Verb  | create input form

create.............. (v) create input form

form: create prompt [;default_entry [;title]]
on OK calls input_result in creator locale

system\classes\input\jinput.ijs Release: 4.05/2000-12-01/10:35


JPWD

built from project: source\classes\pwd\pwd

Defined items
Name  | Class  | Description
create  | Verb  | create pwd form

create.............. (v) create pwd form

form: create prompt [;title [;newpass prompt]]

e.g. create 'Enter password';'Sys Config'
e.g. create 'Enter password';'Sys Config';'Enter New Password';'Confirm New password'

on OK calls pwd_result in creator locale

system\classes\input\jpwd.ijs Release: 4.05/2000-12-01/10:35


JSELECT

built from project: source\main\select\select

Defined items
Name Class Description

system\classes\input\jselect.ijs Release: 4.05/2000-12-01/10:35


JZOPENGL

base opengl class

built from project: source\graphics\opengl\opengl

Defined items
Name Class Description

system\classes\opengl\jzopengl.ijs Release: 4.05/2000-12-01/10:35


OPENGL

loads the jzopengl class

Defined items
Name Class Description

system\classes\opengl\opengl.ijs Release: 4.05/2000-12-01/10:35


JZPLOT

base plot class

built from project: source\graphics\plot\plot

Defined items
Name Class Description

system\classes\plot\jzplot.ijs Release: 4.05/2000-12-01/10:35


PLOT

session definitions for plot

in z locale:
pd       plot driver
plot     standard plot

in jwplot locale:
PForm    form name
pclose   close form

Defined items
Name Class Description

system\classes\plot\plot.ijs Release: 4.05/2000-12-01/10:35


PLOTDEFS

plot defaults

Note: names for global nouns defined in this script must be
uppercase only. Plot does not use uppercase names in the
code, therefore names defined here cannot conflict with it.

verbs:
  plotdefault    set default options
  mydefault      more defaults

nouns:
  keywords
  names for colors + color schemes

Defined items
Name Class Description

system\classes\plot\plotdefs.ijs Release: 4.05/2000-12-01/10:35


JSVIEW

built from project: source\grid\sview\sview

Defined items
Name Class Description

system\classes\view\jsview.ijs Release: 4.05/2000-12-01/10:35


JVIEW

built from project: source\main\view\view

Defined items
Name Class Description

system\classes\view\jview.ijs Release: 4.05/2000-12-01/10:35


JPM

built from project: source\extras\pm\pm\source\extras\pm\pm

Defined items
Name Class Description

system\extras\util\jpm.ijs Release: 4.05/2000-12-01/10:35


SCRIPTDOC

built from project: source\main\script\script

Defined items
Name  | Class  | Description
clipfmt  | Verb  | format data for clipboard

docgetscripts  | Verb  | get script files

remcom  | Verb  | remove comments plus extra blank or *

scriptdefs  | Verb  | definitions for a single file

scriptdef1  | Verb  | definitions for single file data

scriptdef2  | Verb  | returns docs for a single definition

scriptdeffmt  | Verb  | formats definitions for a file

scriptdeffmtsum  | Verb  | formats summary definitions for a file

scriptdoc  | Verb  | view script docs

scriptdoc1  | Verb  | get script docs for a single file

scriptdocsum  | Verb  | get summary script docs for a single file

scripthdr  | h  | for a single file

scripthdr1  | h  | for single file data

scriptspdoc1  | S  | for single file data

scripthdrfmt  | Verb  | formats header for a file

scriptlist  | Verb  | short list of scripts

xdoc  | Verb  | short list of scripts

clipfmt............. (v) format data for clipboard

format array of rank 0 1 or 2 for clipboard.
columns are separated by TAB, rows by CRLF.

docgetscripts....... (v) get script files

returns _1 on fail, else list of scripts

remcom.............. (v) remove comments plus extra blank or *

argument is a boxed list

scriptdefs.......... (v) definitions for a single file

returns definitions as 4-column table

scriptdef1.......... (v) definitions for single file data

returns definitions as a 4-column matrix

scriptdef2.......... (v) returns docs for a single definition

result has 4 elements:
  name
  type
  one line description
  remaining description (vector)

scriptdeffmt........ (v) formats definitions for a file

argument is 4-element boxed list from scriptdefs

scriptdeffmtsum..... (v) formats summary definitions for a file

argument is 4-element boxed list from scriptdefs

scriptdoc........... (v) view script docs

scriptdoc1.......... (v) get script docs for a single file

scriptdocsum........ (v) get summary script docs for a single file

scripthdr........... (h) for a single file

scripthdr1.......... (h) for single file data

scriptspdoc1........ (S) for single file data

scripthdrfmt........ (v) formats header for a file

argument is 2-element boxed list from scripthdr

scriptlist.......... (v) short list of scripts

example:
  scriptlist 1 dir 'system\main'

xdoc................ (v) short list of scripts

example:
  7 xdoc 'system\main'

system\extras\util\scripdoc.ijs Release: 4.05/2000-12-01/10:35


COLIB

class/object library

main verbs:
conl           return co name list
copath         set/get co path
cocreate       create object
cocurrent      set current locale
coname         return current co name
coerase        erase object

utility verbs:
coclass        set co class
codestroy      destroy current object
coextend       add class locale to path (before z)
cofind         find objects containing name in object
cofullname     return name with locale qualifier
coinfo         return info on co classes
conames        formatted co name list
conew          create object
conouns        nouns referencing object
conounsx       object references with locales
copathnl       path name list
copathnlx      formatted path name list with defining classes
corequire      load class if not already loaded
coreset        destroy all object locales
coselect       select current locale
costate        state of class objects

Defined items
Name | Class | Description
conl | Verb | return co name list
copath | Verb | set/get co path
cocreate | Verb | create object
cocurrent | Verb | set current locale
coname | Verb | return current co name
coerase | Verb | erase object
coclass | Verb | set current co class
codestroy | Verb | destroy current object
coextend | Verb | add class locale to path (before z)
cofind | Verb | find objects containing name in object:
cofullname | Verb | return name with locale qualifier
coinfo | Verb | return info on co classes
conames | Verb | formatted co name list
conew | Verb | create object
conouns | Verb | nouns referencing object
conounsx | Verb | object references with locales
copathnl | Verb | path name list
copathnlx | Verb | formatted path name list with defining classes
corequire | Verb | load class if not already loaded
coreset | Verb | destroy all object locales
coselect | Verb | select current locale
costate | Verb | state of class objects

conl................ (v) return co name list

form: conl n
  0 e. n  = return named locales
  1 e. n  = return numbered locales
  conl '' = return both, same as conl 0 1

copath.............. (v) set/get co path

cocreate............ (v) create object

cocurrent........... (v) set current locale

coname.............. (v) return current co name

coerase............. (v) erase object

example: coerase <'jzplot'

coclass............. (v) set current co class

codestroy........... (v) destroy current object

coextend............ (v) add class locale to path (before z)

cofind.............. (v) find objects containing name in object:

cofullname.......... (v) return name with locale qualifier

coinfo.............. (v) return info on co classes

returns noun refs;object;creator;path

conames............. (v) formatted co name list

conew............... (v) create object

conouns............. (v) nouns referencing object

conounsx............ (v) object references with locales

returns: object;references;locales

copathnl............ (v) path name list

path name list

copathnlx........... (v) formatted path name list with defining classes

corequire........... (v) load class if not already loaded

coreset............. (v) destroy all object locales

coselect............ (v) select current locale

costate............. (v) state of class objects

system\main\colib.ijs Release: 4.05/2000-12-01/10:35


COMPARE

comparison utilities

  compare        compare character data
  fcompare       compare files

Defined items
Name | Class | Description
compare | Verb | compare character data
fcompare | Verb | compare 2 text files

compare............. (v) compare character data

returns list of differences.
arguments may be character strings, with lines delimited
by LF, or character matrices (trailing blanks ignored).

for Mac, tolerates lines delimited by CR.

result shows lines not matched, in form:
   n [l] text
where:
   n    =  0=left argument, 1=right argument
  [l]   =  line number
  text  =  text on line

limits comparison to 1e6 >: product of number of lines

fcompare............ (v) compare 2 text files

form: opt fcompare files
  opt is optional suffix
  files is 2 file names or prefixes
example:
  fcompare 'system\main\myutil.ijs \jbak\system\main\myutil.ijs'
  '\myutil.ijs' fcompare 'system\main \jbak\system\main'
system\main\compare.ijs Release: 4.05/2000-12-01/10:35


CONVERT

conversion utilities

av         convert between characters and indices
detab      remove tab stops
dfh        decimal from hex
hex        create verb for hex calculation
hfd        hex from decimal
mfv        matrix from vector
vfm        vector from matrix
quote      quote text

Defined items
Name | Class | Description
dfh | Verb | decimal from hex
hfd | Verb | hex from decimal
hex | Adv | create verb for hex calculation
av | Verb | convert between characters and indices
mfv | Verb | matrix from vector
quote | Verb | quote text
detab | Verb | remove tab stops
vfm | Verb | vector from matrix

dfh................. (v) decimal from hex

hfd................. (v) hex from decimal

hex................. (a) create verb for hex calculation

e.g. 'FF' + hex '8'

av.................. (v) convert between characters and indices

e.g.   av 'abcde'

mfv................. (v) matrix from vector

[delimiter] mfv vector
default delimiter is ' '

quote............... (v) quote text

quote 'Pete''s Place'

detab............... (v) remove tab stops

remove tabs from character string
left argument is tab width, default 4

vfm................. (v) vector from matrix

vector from matrix, lines separated by LF

system\main\convert.ijs Release: 4.05/2000-12-01/10:35


DATES

date and time utilities

  calendar        calendar for year [months]
  isotimestamp    ISO-formatted time stamp
  getdate         get date from character string
  todate          convert to date
  todayno         convert to day number
  tsdiff          differences between dates
  tsrep           timestamp as a single number
  timestamp       formatted timestamp
  valdate         validate dates
  weekday         weekday from date

  tstamp          obsolete naming for timestamp

Defined items
Name | Class | Description
calendar | Verb | calendar for year [months]
getdate | Verb | get date from character string
isotimestamp | Verb | format time stamps as: 2000-05-23 16:06:39.268
todate | Verb | converts day numbers to dates
todayno | Verb | converts dates to day numbers
tsdiff | Verb | differences between pairs of dates.
tsrep | Verb | timestamp representation as a single number
timestamp | Verb | format time stamp as: 23 May 1998 16:06:39
valdate | Verb | validate dates
weekday | Verb | returns weekday from date, 0=Sunday ... 6=Saturday

calendar............ (v) calendar for year [months]

returns calendar for year, as a 12 element list

argument is one or more numbers: year, months
If no months are given, it defaults to all months.

example:
   calendar 1998 5 6
+---------------------+---------------------+
|         May         |         Jun         |
| Su Mo Tu We Th Fr Sa| Su Mo Tu We Th Fr Sa|
|                 1  2|     1  2  3  4  5  6|
|  3  4  5  6  7  8  9|  7  8  9 10 11 12 13|
| 10 11 12 13 14 15 16| 14 15 16 17 18 19 20|
| 17 18 19 20 21 22 23| 21 22 23 24 25 26 27|
| 24 25 26 27 28 29 30| 28 29 30            |
| 31                  |                     |
+---------------------+---------------------+

getdate............. (v) get date from character string

form: [opt] getdate string

useful for input forms that have a date entry field

date forms permitted:
    1986 5 23
    May 23 1986
    23 May 1986
and:
  opt=0  (days first - default)
    23 5 1986
  opt=1  (months first)
    5 23 1986

other characters allowed:  ,-/:

if not given, century defaults to current

only first 3 characters of month are tested.

examples:  23/5/86; may 23, 1986; 1986-5-23

requires: valdate

isotimestamp........ (v) format time stamps as: 2000-05-23 16:06:39.268

y. is one or more time stamps in 6!:0 format

todate.............. (v) converts day numbers to dates

converts day numbers to dates, converse <todayno>

This conversion is exact and provides a means of
performing exact date arithmetic.

y. = day numbers
x. = optional:
  0 - result in form <yyyy mm dd> (default)
  1 - result in form <yyyymmdd>

example:
   todate 72460
1998 5 23

   todate 0 1 2 3 + todayno 1992 2 27
1992 2 27
1992 2 28
1992 2 29
1992 3  1

todayno............. (v) converts dates to day numbers

converts dates to day numbers, converse <todate>

y. = dates
x. = optional:
  0 - dates in form <yyyy mm dd> (default)
  1 - dates in form <yyyymmdd>
0 = todayno 1800 1 1, or earlier

example:
   todayno 1998 5 23
72460

tsdiff.............. (v) differences between pairs of dates.

form:  end tsdiff begin
  end, begin are vectors or matrices in form YYYY MM DD
  end dates should be later than begin dates

method is to subtract dates on a calendar basis to determine
integral number of months plus the exact number of days remaining.
This is converted to payment periods, where # days remaining are
calculated as: (# days)%365

example:
   1994 10 1 tsdiff 1986 5 23
8.35799

tsrep............... (v) timestamp representation as a single number

form: [opt] timerep times
  opt=0  convert timestamps to numbers (default)
      1  convert numbers to timestamps

timestamps are in 6!:0 format, or matrix of same.

examples:
   tsrep 1800 1 1 0 0 0
0
   ":!.13 tsrep 1995 5 23 10 24 57.24
6165887097240

timestamp........... (v) format time stamp as: 23 May 1998 16:06:39

y. is time stamp, if empty default to current time

valdate............. (v) validate dates

form: valdate dates
dates is 3-element vector
      or 3-column matrix
      in form YYYY MM DD
returns 1 if valid

weekday............. (v) returns weekday from date, 0=Sunday ... 6=Saturday

arguments as for <todayno>, e.g.

    5 = weekday 1997 5 23 = 1 weekday 19970523
system\main\dates.ijs Release: 4.05/2000-12-01/10:35


DD

data driver utilities

defines:
ddcon v connect to data source
dddis v disconnect from data source
ddsql v prepare, execute, and end sql statement
ddfet v fetch next record from selected data
ddcol v column names in the table
ddcnm v column names selected by ddsel
ddsrc v data source names available from ODBC manager
ddsel v prepare and execute sql statement (selection)
ddend v end sql statement started with ddsel
dderr v error info on last command (name, source, warning, msg)
ddtrn v begin transaction
ddcom v commit transaction
ddrbk v rollback transaction
ddtbl v selection handle for tables in data source
ddfch v as ddfet, but with data in columns
ddcnt v rowcount of last ddsql command

utility:
ddcheck v check response, display any error message
example: ch=: ddcheck ddcon 'dsn=Access97'

Defined items
Name | Class | Description
ddcon | Verb | connect to data source
dddis | Verb | disconnect from data source
ddsql | Verb | prepare, execute, and end sql statement
ddfet | Verb | fetch next record from selected data
ddcol | Verb | column names in the table
ddcnm | Verb | column names selected by ddsel
ddsrc | Verb | data source names available from ODBC manager
ddsel | Verb | prepare and execute sql statement (selection)
ddend | Verb | end sql statement started with ddsel
dderr | Verb | error info on last command (name, source, warning, msg)
ddtrn | Verb | begin transaction
ddcom | Verb | commit transaction
ddrbk | Verb | rollback transaction
ddtbl | Verb | selection handle for tables in data source
ddfch | Verb | as ddfet, but with data in columns
ddcnt | Verb | rowcount of last ddsql command
ddcheck | Verb | check response, display any error message

ddcon............... (v) connect to data source

dddis............... (v) disconnect from data source

ddsql............... (v) prepare, execute, and end sql statement

ddfet............... (v) fetch next record from selected data

ddcol............... (v) column names in the table

ddcnm............... (v) column names selected by ddsel

ddsrc............... (v) data source names available from ODBC manager

ddsel............... (v) prepare and execute sql statement (selection)

ddend............... (v) end sql statement started with ddsel

dderr............... (v) error info on last command (name, source, warning, msg)

ddtrn............... (v) begin transaction

ddcom............... (v) commit transaction

ddrbk............... (v) rollback transaction

ddtbl............... (v) selection handle for tables in data source

ddfch............... (v) as ddfet, but with data in columns

ddcnt............... (v) rowcount of last ddsql command

utility:

ddcheck............. (v) check response, display any error message

example: ch=: ddcheck ddcon 'dsn=Access97'

system\main\dd.ijs Release: 4.05/2000-12-01/10:35


DEBUG

debug definitions and utilities

e.g.  dbss 'f 0'   monadic line 0
      dbss 'f :2'  dyadic line 2
      dbss 'f *:*' all lines

The call stack (dbstk'') is an 8-column boxed matrix:
  0  name
  1  error number, or 0 if this call is not erroneous
  2  line number
  3  name class
  4  definition
  5  source script
  6  argument list
  7  locals

Defined items
Name | Class | Description
dbr | Verb | reset, set suspension mode (0=disable, 1=enable)
dbs | Verb | display stack
dbsq | Verb | stop query
dbss | Verb | stop set
dbrun | Verb | run again (from current stop)
dbnxt | Verb | run next (skip line and run)
dbret | Verb | exit and return argument
dbjmp | Verb | jump to line number
dbsig | Verb | signal error
dbrr | Verb | re-run with specified arguments
dbrrx | Verb | re-run with specified executed arguments
dberr | Verb | last error number
dberm | Verb | last error message
dbstk | Verb | call stack
dblxq | Verb | latent expression query
dblxs | Verb | latent expression set
dbtrace | Verb | trace control
dbq | Verb | queries suspension mode (set by dbr)
dbst | Verb | returns stack text
dbg | Verb | turn debugging window on/off
dblocals | Verb | display names and locals on stack
dbstack | Verb | displays call stack with header
dbstop | Verb | set stops on all lines in namelist
dbstopme | Verb | set stops on current definition if y.

dbr................. (v) reset, set suspension mode (0=disable, 1=enable)

dbs................. (v) display stack

dbsq................ (v) stop query

dbss................ (v) stop set

dbrun............... (v) run again (from current stop)

dbnxt............... (v) run next (skip line and run)

dbret............... (v) exit and return argument

dbjmp............... (v) jump to line number

dbsig............... (v) signal error

dbrr................ (v) re-run with specified arguments

dbrrx............... (v) re-run with specified executed arguments

dberr............... (v) last error number

dberm............... (v) last error message

dbstk............... (v) call stack

dblxq............... (v) latent expression query

dblxs............... (v) latent expression set

dbtrace............. (v) trace control

dbq................. (v) queries suspension mode (set by dbr)

dbst................ (v) returns stack text

dbg................. (v) turn debugging window on/off

dblocals............ (v) display names and locals on stack

form: [namelist] dblocals stack indices (default all)
example:
         dblocals ''     display all local names in stack
 'abc Z' dblocals i.5    display names abc and Z where found
                         in first 5 definitions on stack

dbstack............. (v) displays call stack with header

if  x.=0  ignores definition and source script (default)
       1  displays full stack
y. is the number of lines to display, all if empty
limits display of each item to length 30.

dbstop.............. (v) set stops on all lines in namelist

dbstopme............ (v) set stops on current definition if y.

does nothing if suspension is off

system\main\debug.ijs Release: 4.05/2000-12-01/10:35


DIR

directory utilities

main verbs:
  dir            directory
  dircompare     compare directories
  dircompares    compare directories (called by dircompare)
  dirpath        directory paths
  dirfind        find name in directory
  dirs           directory browse
  dirss          directory string search
  dirssrplc      search and replace in directory
  dirtree        files in directory tree
  dirused        file count, space in directory tree

Defined items
Name | Class | Description
dir | Verb | directory listings
dircompare | Verb | compare files in directories
dircompares | Verb | compare files in directories
dirfind | Verb | find name in directory
dirpath | Verb | directory paths
dirs | Verb | browse files in directory
dirss | Verb | directory string search
dirssrplc | Verb | directory string search and replace
dirtree | Verb | get filenames in directory tree
dirused | Verb | get count and space of files in directory tree

dir................. (v) directory listings

y. = dos file specification:
     if empty, defaults to *.*

x. is optional:
   - if not given, defaults to 'n'
   - if character, returns a formatted directory,
       where x. is the sort option:
         d=by date
         n=by name
         s=by size
   - if numeric, there are 1 or 2 elements:
         0{  0= list short names
             1= boxed list of full pathnames
             2= full directory list
         1{  0= filenames only (default)
             1= include subdirectories

subdirectories are shown first
filenames are returned in lower case

e.g.  dir ''
      1 dir 'system\main\d*.ijs'

dircompare.......... (v) compare files in directories

form: [opt] dircompare dirs

  dirs = directory names
  opt is optional, with up to three elements:
    0{  =0 short file comparison (default)
        =1 long file comparison
    1{  =0 given directory only (default)
        =1 recurse through subdirectories
    2{  =0 file contents only (default)
        =1 also compare timestamps

e.g.  dircompare 'main \jbak\main'

returns text result or error message

dircompares......... (v) compare files in directories

form: [opt] dircompares dirs

  dirs = directory names
  opt is optional, with up to three elements:
    0{  =0 short file comparison (default)
        =1 long file comparison
    1{  =0 given directory only (default)
        =1 recurse through subdirectories
    2{  =0 file contents only (default)
        =1 also compare timestamps

e.g.  dircompare 'main \jbak\main'

returns error message or 3-element boxed list

dirfind............. (v) find name in directory

find name in directory

form: string dirfind directory

returns filenames in directory tree containing string

e.g. 'jfile' dirfind 'packages'

dirpath............. (v) directory paths

return directory paths starting from y.
optional x.=0  all paths (default)
            1  non-empty paths (i.e. having files)
e.g. dirpath 'examples'

dirs................ (v) browse files in directory

e.g.  dirs 'system\main\*.ijs'

dirss............... (v) directory string search

form: string dirss directory

searches for files in directory tree containing string,
returning formatted display where found.

e.g. 'create' dirss 'main'

If x. is a 2-element boxed list, calls dirssrplc

dirssrplc........... (v) directory string search and replace

form: (old;new) dirssrplc files
example:
   ('old';'new') dirssrplc 'system\main\*.ijs'

dirtree............. (v) get filenames in directory tree

return filenames in directory tree as boxed matrix
optional x. is a timestamp to exclude earlier files
each row contains:  filename;timestamp;size
e.g.  dirtree ''
      dirtree 'main'
      dirtree 'system\packages\*.ijs'
1997 5 23 dirtree ''   - files dated on or after date.
directory search is recursive through subdirectories
filenames are returned in lower case

dirused............. (v) get count and space of files in directory tree

system\main\dir.ijs Release: 4.05/2000-12-01/10:35


DLL

utilities for calling DLLs (dynamic link libraries)

Defined items
Name  | Class  | Description
cd  | Verb  | call DLL procedure

memr  | Verb  | memory read

memw  | Verb  | memory write

mema  | Verb  | memory allocate

memf  | Verb  | memory free

cdf  | Verb  | free DLLs

cder  | Verb  | error information

cderx  | Verb  | GetLastError information

cdcb  | Verb  | callback address

ic  | Verb  | integer conversion

fc  | Verb  | float conversion

bitwise  | Adv  | bitwise operations

AND  | Verb  | bitwise AND (&)

OR  | Verb  | bitwise OR  (|)

XOR  | Verb  | bitwise XOR (^)

cd.................. (v) call DLL procedure

memr................ (v) memory read

memw................ (v) memory write

mema................ (v) memory allocate

memf................ (v) memory free

cdf................. (v) free DLLs

cder................ (v) error information

cderx............... (v) GetLastError information

cdcb................ (v) callback address

ic.................. (v) integer conversion

conversions
e.g.
   25185 25699  =  _1 ic 'abcd'
   'abcd'  =  1 ic _1 ic 'abcd'
   1684234849 1751606885  = _2 ic 'abcdefgh'
   'abcdefgh'  =  2 ic _2 ic 'abcdefgh'

fc.................. (v) float conversion

bitwise............. (a) bitwise operations

(monadic and dyadic)
e.g.  7  =  1 OR 2 OR 4
         =  OR 1 2 4

AND................. (v) bitwise AND (&)

OR.................. (v) bitwise OR  (|)

XOR................. (v) bitwise XOR (^)

system\main\dll.ijs Release: 4.05/2000-12-01/10:35


FILES

file access utilities

read verbs take a right argument of a filename, optionally
linked with one or two numbers (as for 1!:11):
  0 = start of read (may be negative)
  1 = length of read (default rest of file)

write verbs return number of characters written.

filenames may be open or boxed character strings.

string verbs write out text delimited by CRLF, and read in
text delimited by LF.

Use charsub (defined in strings.ijs) to substitute unwanted characters,
e.g. '-_' charsub fread 'mydata.dat' replaces - with _

   dat fappend fl     append
   dat fappends fl    append string
   to  fcopynew fls   copy files (if changed)
   to  fcopynews fls  copy files as strings (if changed)
       fdir           file directory
       ferase fl      erase file
       fexist fl      return 1 if file exists
   opt fread fl       read file
       freadr fl      read records (flat file)
       freads fl      read string
   dat freplace fl    replace in file
   opt fselect txt    select file
       fsize fl       size of file
   str fss fl         string search file
oldnew fssrplc fl     search and replace in file
       fstamp fl      file timestamp
       fview fl       view file
   dat fwrite fl      write file
   dat fwrites fl     write string

on error, the result is _1,
i.e. for file not found/file read error/file write error

Defined items
Name | Class | Description
fappend | Verb | append character text to file
fappends | Verb | append character text to file.
fcopynew | Verb | copies files if changed
fcopynews | Verb | copies files as strings if changed
fdir | Verb | file directory
ferase | Verb | erases a file
fexist | Verb | tests if the file exists
fread | Verb | read file
freadr | Verb | read records from flat file
freads | Verb | read file as string
freplace | Verb | replace text in file
fselect | Verb | file selection dialog
fsize | Verb | return file size
fss | Verb | file string search
fssrplc | Verb | file string search and replace
fstamp | Verb | returns file timestamp
fview | Verb | view file
fwrite | Verb | write text to file
fwrites | Verb | write string to file

fappend............. (v) append character text to file

    The text is first ravelled. The file is created if necessary.
Returns number of characters written, or an error message.
form: text fappend filename
example:
  'chatham' fappend 'newfile.txt'
7

fappends............ (v) append character text to file.

The text is first ravelled into a vector with each row
terminated by the CRLF pair. Any single LF or CR characters
in the text are converted into the CRLF pair.
The file is created if necessary. Returns number of characters
written, or an error message.

fcopynew............ (v) copies files if changed

form: tofile fcopynew fromfiles
returns: 0, size    not changed
         1, size    changed
         _1         failure

fcopynews........... (v) copies files as strings if changed

form: tofile fcopynews fromfiles
returns: 0, size    not changed
         1, size    changed
         _1         failure

fdir................ (v) file directory

example:
  fdir 'system\main\s*.ijs'

ferase.............. (v) erases a file

Returns 1 if successful, otherwise _1

fexist.............. (v) tests if the file exists

Returns 1 if the file exists, otherwise 0.

fread............... (v) read file

y. is filename {;start size}
x. is optional:
   = b    read as boxed vector
   = m    read as matrix
   = s    read as string (same as freads)

freadr.............. (v) read records from flat file

y. is filename {;record start, # of records}
records are assumed of fixed length delimited by
one (only) of CR, LF, or CRLF.
the result is a matrix of records.

freads.............. (v) read file as string

y. is filename {;start size}
x. is optional (b and m same as fread):
   = b    read as boxed vector
   = m    read as matrix
freads

freplace............ (v) replace text in file

form: dat freplace file;pos

fselect............. (v) file selection dialog

y. = DOS filespec or ''
x. = optional file type list
returns user selection

fsize............... (v) return file size

returns file size or _1 if error

fss................. (v) file string search

form: str fss file
search file for string, returning indices

fssrplc............. (v) file string search and replace

form: (old;new) fssrplc file

fstamp.............. (v) returns file timestamp

fview............... (v) view file

uses standard Windows edit control,
which is limited to around 20K size.

fwrite.............. (v) write text to file

fwrites............. (v) write string to file

system\main\files.ijs Release: 4.05/2000-12-01/10:35


FORMAT

formatting utilities

center       width center text
clipfmt      format data for clipboard
clipunfmt    unformat data read from clipboard
colhdr       column headers
expandby     expand data with fit value
expandn      expand data at every nth item
flatten      flatten array to a character string
fmt          format numeric matrix, various options
fold         fold text to width
hexdump      show text as hex and ascii characters
nfmt         simple numeric formatter
ruler        returns formatted ruler
sqzint       squeeze list of positive integers into short form
sqzrun       squeeze list of numbers into short form
xfmt         format extended integers

Defined items
Name | Class | Description
center | Verb | width center text
clipfmt | Verb | format data for clipboard
clipunfmt | Verb | unformat data read from clipboard
colhdr | Verb | column headers
expandby | Conj | expand data with fit value
expandn | Verb | expand data at every nth item
flatten | Verb | flatten array to a character string
fmt | Verb | format numeric matrix, various options
fold | Verb | fold text to width
hexdump | Verb | show text as hex and ascii characters
nfmt | Verb | simple numeric formatter
ruler | Verb | returns formatted ruler
sqzint | Verb | squeeze list of positive integers into short form
sqzrun | Verb | squeeze list of numbers into short form
xfmt | Verb | format extended integers

center.............. (v) width center text

form: width center text

clipfmt............. (v) format data for clipboard

format array of rank 0 1 or 2 for clipboard.
columns are separated by TAB, rows by CRLF.

clipunfmt........... (v) unformat data read from clipboard

returns boxed matrix from clipboard result,
recognizing TAB and CRLF as separators.
characters are not converted to numbers.
note this is not a true inverse of clipfmt.
e.g. try:  clipunfmt clipfmt i.5 6

colhdr.............. (v) column headers

returns matrix of column headers.

y. = list with columns delimited by semicolons; and lines
     in each column delimited by commas.
x. is wid or (wid;just), where:
  wid  = column widths
  just = a singleton or vector of:
       0 = centre header, then right justify (default)
       1 = center header in wid
       2 = right justify
       3 = left justify

e.g.  hdr=. 'Number,of,employees;Total,salary;Monthly,net,payment'
      (15 12 12;1) colhdr hdr

expandby............ (c) expand data with fit value

e.g.    0 1 0 0 1 expandby 99 [ 10 20
     99 10 99 99 20

expandn............. (v) expand data at every nth item

n expandn dat
expand array at every nth cell.
e.g. 'ABC DEF G' = 3 expandn 'ABCDEFG'

flatten............. (v) flatten array to a character string

flattens array to a character string with same display

fmt................. (v) format numeric matrix, various options

syntax: specs fmt nums

nums = numeric vector or matrix or boxed list
       a vector is treated as a 1-row matrix.
       a boxed list is treated as boxed columns
specs= formats, separated by commas, applied
       to each column, or item if boxed.

formats are either edit or positional:
edit formats have the form: {o}w{.d}, where:
  o is optional qualifiers from the set:
     nr=n repetitions (must be given first)
      b=blank if zero
      c=commas
      z=zero fill
  w is field width
  d is decimal places

positional formats have the form:
  xn    = n blanks, e.g. x3

e.g. 'c10.3,x2,2rz5'  has formats:
        width 10, decimal places 3, commas
        2 blanks
        width 5, zero fill, repeated twice

fold................ (v) fold text to width

syntax:   {width} fold data
data is character vector
width defaults to screenwidth

hexdump............. (v) show text as hex and ascii characters

nfmt................ (v) simple numeric formatter

simple format of numeric vector or matrix in readable form.
opt is optional, up to 3 elements:
  0 = maximum decimal places, max 9  (4)
  1 = minimum field width            (0)
  2 = display width                  (screenwidth)

ruler............... (v) returns formatted ruler

returns a formatted ruler
e.g.    ruler 75      horizontal
      1 ruler 30      vertical

sqzint.............. (v) squeeze list of positive integers into short form

Squeeze list of positive integers into short character list.
If x. = 1, sort y. first.
e.g.  sqzint 1 2 3 7 8 9 10  =  1-3,7-10
see also <sqzrun>

sqzrun.............. (v) squeeze list of numbers into short form

Squeeze list of numbers into short character list.
e.g.  sqzrun 1.1 1.1 1.1 7 9 9 10.25 = 3#1.1,7,2#9,10.25
See also <sqzint>.

xfmt................ (v) format extended integers

form: [width] xfmt number
groups in 3's up to 1e12, and 5's thereafter

system\main\format.ijs Release: 4.05/2000-12-01/10:35


GL2

2D graphics definitions

Defined items
Name Class Description

system\main\gl2.ijs Release: 4.05/2000-12-01/10:35


GL3

3D graphics definitions

Defined items
Name Class Description

system\main\gl3.ijs Release: 4.05/2000-12-01/10:35


JADELIB

Standard jade library (in j locale)

requires file: loadlib.ijs for the load utilities
requires file: scripts.ijs for script definitions

CFGPATH        config path
FRET           text fret
INPUTLOG       session input log
PATHSEP        path separator \ or /
WINPOS         window positions
buildpublic    build public names
buildsource    build source names
edit           edit name
editinputlog   input log
editinputlogs  input log select
help           help support
loadactive     load active script window
save           save current definitions to a script file
scriptmake     make single script file from several files
scripts        access script definitions
selactive      selections for active script window

wpreset        reset window positions
wpsave         save
wpset          set

utilities:
build3         called by builder
builder        build names utility
getscripts     get script names
globaldefs     global definitions in text
info           display info message
notloaded      if class not loaded
open           open script file
openfiles      open files utility
origin         find script of origin
putconfig      put new values into CONFIG

session menu verbs:
debug          activate debugger
projectmanager load Project Manager

plus: extras verbs
plus: "z" verbs: edit, loadp, open, scripts

Defined items
Name | Class | Description
wpsave | Verb | save window position (if not max or min)
wpset | Verb | set window position
wpreset | Verb | clear window position
loadp | Verb | load project
open | Verb | open script
scripts | Verb | view script names
edit | Verb | edit name

wpsave.............. (v) save window position (if not max or min)

optional left argument is new position

wpset............... (v) set window position

wpreset............. (v) clear window position

loadp............... (v) load project

open................ (v) open script

scripts............. (v) view script names

edit................ (v) edit name

system\main\jadelib.ijs Release: 4.05/2000-12-01/10:35


JMF

built from project: source\api\mapped\mapped

Defined items
Name Class Description

system\main\jmf.ijs Release: 4.05/2000-12-01/10:35


LOADLIB

script load library (in j locale)

FRET           J fret
JDIR           J directory
LOADED         loaded files;locales
PUBLIC         public scripts
SOURCE         source scripts (typically set in projects)

load           load script file
loads          load scripts
require        load script file if not already loaded

utilities:
boxopen        box if open
dosname        convert to full pathname in DOS
exist          if file exists (unsecure mode)
filex          default file extension
fullname       convert to full pathname
getconfig      get values from CONFIG
loadreset      reset LOADED noun
macname        convert to full pathname in MAC
pathsep        convert path separator
tolower        convert to lowercase
unixname       convert to full pathname in UNIX

plus "z" verbs: load, loadd, require

Defined items
Name | Class | Description
load | Verb | load script
loadd | Verb | load script with display
require | Verb | require script

load................ (v) load script

loadd............... (v) load script with display

require............. (v) require script

system\main\loadlib.ijs Release: 4.05/2000-12-01/10:35


MISC

miscellaneous utilities

 addwmfheader  add metafile header to wmf file
 boxcols       box columns of matrix
 chop          chop array into boxed list
 default       set default value
 diff          differences
 index         index
 join          join boxed items
 nubcount      nub + count
 pathname      split DOS name into path;name
 scriptform    script representation of names
 show          show names using linear representation
 subs          substitution
 tolist        convert boxed list to LF delimited list

Defined items
Name | Class | Description
diff | Verb | differences
join | Verb | join boxed items
nubcount | Verb | nub + count
pathname | Verb | split DOS name into path;name
tolist | Verb | convert boxed list to LF delimited list
addwmfheader | Verb | add metafile header to wmf file
boxcols | Verb | box columns of matrix
chop | Verb | chop array into boxed list
default | Verb | set default value
index | Verb | index where result is _1 if not found, instead of #x.
scriptform | s | representation of names
show | Verb | show names using linear representation
subs | Conj | substitution

diff................ (v) differences

join................ (v) join boxed items

nubcount............ (v) nub + count

pathname............ (v) split DOS name into path;name

tolist.............. (v) convert boxed list to LF delimited list

addwmfheader........ (v) add metafile header to wmf file

form: [outfile] addwmfheader infile

metafiles used by Word etc. require 22 byte header

outfile addwmfheader infile ; width height (%1000 of inches)

boxcols............. (v) box columns of matrix

y. is a matrix
x. indicates partitions
  - a single integer is size of each partition
  - a boolean is beginning of each partition
examples:
   3 boxcols i.3 7
+--------+--------+--+
| 0  1  2| 3  4  5| 6|
| 7  8  9|10 11 12|13|
|14 15 16|17 18 19|20|
+--------+--------+--+

   1 0 1 0 0 0 1 boxcols i.3 7
+-----+-----------+--+
| 0  1| 2  3  4  5| 6|
| 7  8| 9 10 11 12|13|
|14 15|16 17 18 19|20|
+-----+-----------+--+

chop................ (v) chop array into boxed list

chop character vector or matrix into boxed list.
x. is optional delimiter, default LF if in text, else blank.
If a matrix, the delimiter must be vertically aligned,
otherwise use chop"1 to chop each row of the matrix.
e.g.  chop ": 10 20 30
      chop ": i. 5 4

default............. (v) set default value

name default value
set global name to value if not already defined

index............... (v) index where result is _1 if not found, instead of #x.

example:
   'abc' index 'ce'
 2 _1

scriptform.......... (s) representation of names

representation using multi-line script form for most explicit
definitions, otherwise linear representation.
useful for writing object definitions to a script file.

show................ (v) show names using linear representation

show names using linear representation to screen width
syntax:
  show namelist  (e.g. show 'deb edit list')
  show numbers   (from 0 1 2 3=nouns, adverbs etc)
  show ''        (equivalent to show 0 1 2 3)
useful for a quick summary of object definitions

subs................ (c) substitution

form: new (old subs test) data
examples:
   10 (2 subs =) 1 3 2 1 5 2
1 3 10 1 5 10
   10 (2 subs <:) 1 3 2 1 5 2
1 10 10 1 10 10
(from David Alis)

system\main\misc.ijs Release: 4.05/2000-12-01/10:35


MYUTIL

example scripts for user definitions

Defined items
Name  | Class  | Description
brep  | Verb  | boxed representation

tree  | Verb  | tree representation

lrep  | Verb  | linear representation

prep  | Verb  | parenthesized representation

snap  | Verb  | names snapshot

time  | Verb  | time

pps  | Verb  | set print precision

timex  | Verb  | time expressions

timespacex  | Verb  | time and space for expressions

tolist  | Verb  | convert boxed list to LF delimited list

brep................ (v) boxed representation

tree................ (v) tree representation

lrep................ (v) linear representation

prep................ (v) parenthesized representation

snap................ (v) names snapshot

time................ (v) time

pps................. (v) set print precision

timex............... (v) time expressions

Form: [repetitions] timex 'expression'

timespacex.......... (v) time and space for expressions

Form: [repetitions] timex 'expression'
Example:
   10 timespacex &> 'q:123456787';'3^10000x'
0.005 58432
0.061 52352

tolist.............. (v) convert boxed list to LF delimited list

system\main\myutil.ijs Release: 4.05/2000-12-01/10:35


NUMERIC

numeric utilities

 baserep        y. in base x.
 clean          clean y. to tolerance of x. (default 1e_10)
 colsum         sum data columns of matrix by key
 groupndx       group indices of y. in x.
 int01          interval in n steps from 0 to 1 (= steps 0 1,n)
 linsert        linear insert x. (default 2) steps into y.
 randomize      sets a random value into random link
 range          range from a to b [in steps of c]
 recur          solves recurrence r(i)=a(i)+r(i-1)*m(i-1)
 round          round y. to nearest x. (e.g. 1000 round 12345)
 rounddist      round y. to nearest x. preserving total
 roundint       round to nearest integer
 steps          steps from a to b in c steps

Defined items
Name | Class | Description
baserep | Verb | y. in base x.
int01 | Verb | interval in n steps from 0 to 1 (= steps 0 1,n)
linsert | Verb | linear insert x. (default 2) steps into y.
round | Verb | round y. to nearest x. (e.g. 1000 round 12345)
roundint | Verb | round to nearest integer
clean | Verb | clean y. to tolerance of x. (default 1e_10)
colsum | Verb | sum data columns of matrix by key
groupndx | Verb | group indices of y. in x.
randomize | Verb | sets a random value into random link
range | Verb | range from a to b [in steps of c]
recur | Verb | solves recurrence r(i)=a(i)+r(i-1)*m(i-1)
rounddist | Verb | round y. to nearest x. preserving total
steps | Verb | steps from a to b in c steps

baserep............. (v) y. in base x.

int01............... (v) interval in n steps from 0 to 1 (= steps 0 1,n)

linsert............. (v) linear insert x. (default 2) steps into y.

round............... (v) round y. to nearest x. (e.g. 1000 round 12345)

roundint............ (v) round to nearest integer

clean............... (v) clean y. to tolerance of x. (default 1e_10)

form: tolerance (default 1e_10) clean numbers
sets values less than tolerance to 0

colsum.............. (v) sum data columns of matrix by key

form: key colsum mat
sum data columns of matrix on key columns
e.g. if column 2 of mat is age, then
   2 colsum mat
sums the remaining columns by age

groupndx............ (v) group indices of y. in x.

Return group indices of elements of y.
x. is an integer vector of the starting numbers of each group,
assumed to be in ascending order.
e.g.  0 0 0 1 1 1 2 2  =  0 3 6 groupndx i.8
i.e.  <:@(+/@(<:/))

randomize........... (v) sets a random value into random link

range............... (v) range from a to b [in steps of c]

recur............... (v) solves recurrence r(i)=a(i)+r(i-1)*m(i-1)

form: r = m recur a
  r(0) = a(0)
  r(i) = a(i)+r(i-1)*m(i-1)
e.g    1.05 1.10 recur 100 100 100
    100 205 325.5

rounddist........... (v) round y. to nearest x. preserving total

distributive rounding
round y. to nearest x. preserving total to nearest x.
e.g.    0.1 rounddist 6$0.45
     0.5 0.5 0.5 0.4 0.4 0.4

steps............... (v) steps from a to b in c steps

form: steps a,b,c

system\main\numeric.ijs Release: 4.05/2000-12-01/10:35


PACK

package utilities

a package is a 2-column matrix of:  name, value
that can be used to store nouns, or otherwise
associate names and values.

A "name" is any character vector. pack and pdef work
only when the names are proper J names.

definitions for nouns only:
  pk=.        pack nl         create package from namelist
  nl=.        pdef pk         define package

definitions for any names:
  text=. pk1  pcompare pk2   compare packages
  val=.  name pget pk        get value of name in package
  pk=.   new  pset old       merge new and old packages
  pk=.   nl   pex pk         remove namelist from package
  pk=.   nl   psel pk        select namelist from package

Defined items
Name | Class | Description
pack | Verb | package namelist
pdef | Verb | package define
pcompare | Verb | compare two packages
pex | Verb | remove namelist from package
pget | Verb | return value of name in package
psel | Verb | select namelist from package
pset | Verb | merge new into old

pack................ (v) package namelist

form:  pack 'one two three'
       pack 'one';'two';'three'

pdef................ (v) package define

form: pdef pk

pcompare............ (v) compare two packages

form: pk1 pcompare pk2

pex................. (v) remove namelist from package

form: namelist pex pk

pget................ (v) return value of name in package

form: name pget pk        - return value of name in package

psel................ (v) select namelist from package

form: namelist psel pk

pset................ (v) merge new into old

form: new pset old
result has values in new, plus any values in old that
were not replaced in new
system\main\pack.ijs Release: 4.05/2000-12-01/10:35


PARTS

partition functions

Partitions are typically given by a boolean with 1's marking
the beginning or end of each partition. Partitions are also
sometimes given in terms of the lengths of each partition.

Verbs defined here assume that boolean 1's mark the beginning
of each partition - see comments at the end for examples of
end-partition verbs.

The verbs psum and psumscan illustrate definitions appropriate
for verbs that return scalar or non-scalar results, respectively.
utility used to build non-scalar partition functions:

e.g.
  1 0 0 1 0 0 0 = firstones 1 1 0 1 1 1 0
  0 0 1 0 1 = lastones 1 1 1 0 1
  2 3 1 = lfp 1 0 1 0 0 1
  1 1 0 1 0 0 1 = partition 1 9 9 4 4 4 9
  0 0 0 1 2 2 3 = runindices 3 1 2 1
  1 2 3 1 = runlengths 1 9 9 4 4 4 9

x=. 1 0 1 0 0 [ y=. 5 3 2 2 7
  3 5 7 2 2 = x preverse y
  3 5 2 2 7 = x psort y
  8 11 = x psum y
  5 8 2 4 11 = x psumscan y

Defined items
Name | Class | Description
firstones | Verb | first 1's in partition
lastones | Verb | last 1's in partition
lfp | Verb | lengths from partition
partition | Verb | partition items (1 marks new item)
pfl | Verb | partition from lengths
runindices | Verb | indices from run lengths
runlengths | Verb | lengths of each run
preverse | Verb | partioned reverse
psort | Verb | partioned sort
psum | Verb | partioned sum
psumscan | Verb | partioned sumscan

firstones........... (v) first 1's in partition

form: firstones part

lastones............ (v) last 1's in partition

form: lastones part

lfp................. (v) lengths from partition

form: lfp part

partition........... (v) partition items (1 marks new item)

form: partition dat

pfl................. (v) partition from lengths

form: pfl len

runindices.......... (v) indices from run lengths

form: runindices

runlengths.......... (v) lengths of each run

form: runlengths dat

preverse............ (v) partioned reverse

form: part preverse dat

psort............... (v) partioned sort

form: part psort dat

psum................ (v) partioned sum

form: part psum dat

psumscan............ (v) partioned sumscan

form: part psumscan dat
system\main\parts.ijs Release: 4.05/2000-12-01/10:35


REGEX

built from project: source\api\regex\regex

Defined items
Name  | Class  | Description
rxmatch  | Verb  | single match

rxmatches  | Verb  | all matches

rxcomp  | Verb  | compile pattern

rxfree  | Verb  | free pattern handles

rxhandles  | Verb  | list pattern handles

rxinfo  | Verb  | info on pattern handles

rxeq  | Verb  | regex equivalent of -:

rxin  | Verb  | regex equivalent of e.

rxindex  | Verb  | regex equivalent of i.

rxE  | Verb  | regex equivalent of E.

rxfirst  | Verb  | regex equivalent of {.@{ (first match)

rxall  | Verb  | regex equivalent of { (all matches)

rxrplc  | Verb  | search and replace

rxapply  | Verb  | apply verb to pattern

rxerror  | Verb  | last regex error message

rxcut  | Verb  | cut string into nomatch/match list

rxfrom  | Verb  | matches from string

rxmerge  | Verb  | replace matches in string

rxmatch............. (v) single match

rxmatches........... (v) all matches

rxcomp.............. (v) compile pattern

rxfree.............. (v) free pattern handles

rxhandles........... (v) list pattern handles

rxinfo.............. (v) info on pattern handles

rxeq................ (v) regex equivalent of -:

rxin................ (v) regex equivalent of e.

rxindex............. (v) regex equivalent of i.

rxE................. (v) regex equivalent of E.

rxfirst............. (v) regex equivalent of {.@{ (first match)

rxall............... (v) regex equivalent of { (all matches)

rxrplc.............. (v) search and replace

rxapply............. (v) apply verb to pattern

rxerror............. (v) last regex error message

rxcut............... (v) cut string into nomatch/match list

rxfrom.............. (v) matches from string

rxmerge............. (v) replace matches in string

system\main\regex.ijs Release: 4.05/2000-12-01/10:35


SOCKET

built from project: source\api\winsock\winsock

Defined items
Name Class Description

system\main\socket.ijs Release: 4.05/2000-12-01/10:35


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
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 ({.)
toCRLF         converts character strings to CRLF delimiter
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
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)
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
script | Verb | load script, cover for 0!:0
scriptd | Verb | load script with display, cover for 0!:1
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
toCRLF | Verb | converts character strings to CRLF delimiter
toHOST | Verb | converts character strings to Host delimiter
toJ | Verb | converts character strings to J delimiter (linefeed)
wcsize | Verb | size 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)

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

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

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

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

toCRLF.............. (v) converts character strings to CRLF delimiter

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.ijs Release: 4.05/2000-12-01/10:35


STRINGS

string manipulation

charsub        character substitution
cut            cut text, by default on blanks
cuts           cut y. at x. (conjunction)
deb            delete extra blanks
debc           delete extra blank columns in matrix
dlb            delete leading blanks
dltb           delete leading and trailing blanks
dltbs          delete multiple leading and trailing blanks
dtb            delete trailing blanks
delstring      delete occurrences of x. from y.
ljust          left justify
rjust          right justify
rplc           replace in string
ss             string search for x. in y.

dropafter      drop after x. in y.
dropto         drop to x. in y.
takeafter      take after x. in y.
taketo         take to x. in y.

For example:

  3       =  'de' # cuts _1 'abcdefg'
  'abcfg' =  'de' delstring 'abcdefg'
  'abcde' =  'de' dropafter 'abcdefg'
  'defg'  =  'de' dropto    'abcdefg'
  'fg'    =  'de' takeafter 'abcdefg'
  'abc'   =  'de' taketo    'abcdefg'

Defined items
Name | Class | Description
cuts | Verb | cut y. at x. (conjunction)
cut | Verb | cut text, by default on blanks
deb | Verb | delete extra blanks
dlb | Verb | delete leading blanks
dltb | Verb | delete leading and trailing blanks
dtb | Verb | delete trailing blanks
delstring | Verb | delete occurrences of x. from y.
ljust | Verb | left justify
rjust | Verb | right justify
ss | Verb | string search
dropafter | Verb | drop after x. in y.
dropto | Verb | drop to x. in y.
takeafter | Verb | take after x. in y.
taketo | Verb | take to x. in y.
charsub | Verb | character substitution
dltbs | Verb | delete multiple leading and trailing blanks
rplc | Verb | replace characters in text string

cuts................ (v) cut y. at x. (conjunction)

string (verb cuts n) text
  n=_1  up to but not including string
  n= 1  up to and including string
  n=_2  after but not including string
  n= 2  after and including string

cut................. (v) cut text, by default on blanks

deb................. (v) delete extra blanks

dlb................. (v) delete leading blanks

dltb................ (v) delete leading and trailing blanks

dtb................. (v) delete trailing blanks

delstring........... (v) delete occurrences of x. from y.

ljust............... (v) left justify

rjust............... (v) right justify

ss.................. (v) string search

dropafter........... (v) drop after x. in y.

dropto.............. (v) drop to x. in y.

takeafter........... (v) take after x. in y.

taketo.............. (v) take to x. in y.

charsub............. (v) character substitution

characterpairs charsub data
For example:
   '-_$ ' charsub '$123 -456 -789'
 123 _456 _789
Use <rplc> for arbitrary string replacement.

dltbs............... (v) delete multiple leading and trailing blanks

text is delimited by characters in x. with default LF
example:
   < 'A' dltbs ' A abc  def  Ars  A  x y  z  '
+-------------------+
|Aabc  defArsAx y  z|
+-------------------+

rplc................ (v) replace characters in text string

form: text rplc oldnew
  oldnew is a 2-column boxed matrix of old ,. new
  or a vector of same

replace priority is the same order as oldnew

Examples:

   'ababa' rplc 'aba';'XYZT';'ba';'+'
XYZT+

   'ababa' rplc 'ba';'+';'aba';'XYZT'
a++

system\main\strings.ijs Release: 4.05/2000-12-01/10:35


TEXT

text utilities

conventions:
  the delimiter used is LF
  "paragraph" is a character string terminated by a LF
              paragraphs would normally be reformatted for display
  "text"      is a character string with possibly several LFs.

main verbs:
  capitalize   capitalize text
  cutpara      cut character string into boxed list of paragraphs
  cuttext      cut character string into boxed list of texts
  foldtext     fold character string to given width

utilities:
  foldpara     fold single paragraph to given width
  topara       convert character string into paragraphs

Defined items
Name | Class | Description
capitalize | Verb | capitalize text
cutpara | Verb | cut text into boxed list of paragraphs
cuttext | Verb | cut text into boxed list of texts
foldtext | Verb | fold text to given width
foldpara | Verb | fold single paragraph
topara | Verb | convert text to paragraphs

capitalize.......... (v) capitalize text

capitalize text (vector delimited by LF, or matrix)

all first letters are capitalized, otherwise:
x.=0  capitalize first letter following a fullstop followed by
      a blank or LF or LF,LF  (sentence capitalization=default)
   1  capitalize any letter preceded by a blank
   2  capitalize first letter in any alphabetic string

cutpara............. (v) cut text into boxed list of paragraphs

form: cutpara text

cuttext............. (v) cut text into boxed list of texts

form: cuttext text

foldtext............ (v) fold text to given width

form: width foldtext text

foldpara............ (v) fold single paragraph

syntax:   {width} fold data
data is character vector

topara.............. (v) convert text to paragraphs

form: topara text
replaces single LFs not followed by blanks by spaces,
except for LF's at the beginning
system\main\text.ijs Release: 4.05/2000-12-01/10:35


TRIG

trigonometric functions

Defined items
Name  | Class  | Description
sin  | Verb  | sin

cos  | Verb  | cos

tan  | Verb  | tan

sinh  | Verb  | sinh

cosh  | Verb  | cosh

tanh  | Verb  | tanh

arcsin  | Verb  | arcsin

arccos  | Verb  | arccos

arctan  | Verb  | arctan

arcsinh  | Verb  | arcsinh

arccosh  | Verb  | arccosh

arctanh  | Verb  | arctanh

pi  | Noun  | pi

dfr  | Verb  | degrees from radians

rfd  | Verb  | radians from degrees

indegrees  | Adv  | convert function to use degrees:

sind  | Verb  | sin in degrees

cosd  | Verb  | cos in degrees

tand  | Verb  | tan in degrees

sin................. (v) sin

cos................. (v) cos

tan................. (v) tan

sinh................ (v) sinh

cosh................ (v) cosh

tanh................ (v) tanh

arcsin.............. (v) arcsin

arccos.............. (v) arccos

arctan.............. (v) arctan

arcsinh............. (v) arcsinh

arccosh............. (v) arccosh

arctanh............. (v) arctanh

pi.................. (n) pi

dfr................. (v) degrees from radians

rfd................. (v) radians from degrees

indegrees........... (a) convert function to use degrees:

sind................ (v) sin in degrees

cosd................ (v) cos in degrees

tand................ (v) tan in degrees

system\main\trig.ijs Release: 4.05/2000-12-01/10:35


VALIDATE

data validation

verbs return 1 if true, 0 if false

data type verbs check the data, not the internal representation.
For example, 1j1-0j1 is considered boolean, though stored as complex.

e.g.
  5 10 inrange i.12
  '()' isbalanced '(123(45))'

Defined items
Name | Class | Description
inrange | Verb | (low, high) inrange data
isbalanced | Verb | pair isbalanced string
isboolean | Verb | data is all 0 or 1
isboxed | Verb | is boxed
ischaracter | Verb | data is character
iscounter | Verb | data is non-negative integer (counting number)
iscomplex | Verb | data is complex
isdate | Verb | is date (as yyyy mm dd)
isinteger | Verb | data is all integer
ismatrix | Verb | data is a matrix
isnumeric | Verb | data is numeric
isreal | Verb | data is all real
isscalar | Verb | data is a scalar
isvector | Verb | data is a vector

inrange............. (v) (low, high) inrange data

isbalanced.......... (v) pair isbalanced string

isboolean........... (v) data is all 0 or 1

isboxed............. (v) is boxed

ischaracter......... (v) data is character

iscounter........... (v) data is non-negative integer (counting number)

iscomplex........... (v) data is complex

isdate.............. (v) is date (as yyyy mm dd)

isinteger........... (v) data is all integer

ismatrix............ (v) data is a matrix

isnumeric........... (v) data is numeric

isreal.............. (v) data is all real

isscalar............ (v) data is a scalar

isvector............ (v) data is a vector

system\main\validate.ijs Release: 4.05/2000-12-01/10:35


WINLIB

standard windows library

defined in z locale

these definitions are assumed available to other windows programs

load after standard library 'stdlib.ijs'

wd            main window driver
wde           wd error - as wd but displays error and signals break
wdbox         box wd argument
wdcenter      center form on another
wdclipread    read clipboard
wdclipwrite   write to clipboard
wdfit         ensure form fits in window
wdget         get values from matrix, e.g. wd'q'
wdhandler     wd handler
wdinfo        information box
wdisparent    if a parent window
wdmove        position window
wdpclose      close parent window
wdqshow       display result of wdq
wdquery       query box
wdreset       reset window driver
wdselect      selection box
wdstatus      put status message on screen
wdview        text viewer

Defined items
Name | Class | Description
wd | Verb | main window driver, name for 11!:0
wdreset | Verb | reset window driver
wdclipread | Verb | read clipboard
wdisparent | Verb | return 1 if a parent window
wdbox | Verb | box wd argument
wdcenter | Verb | center form on another
wdclipwrite | Verb | write to clipboard
wde | Verb | as wd but displays error and signals break
wdfit | Verb | fit form in window
wdget | Verb | get values from matrix, e.g. wd'q'
wdhandler | Verb | wd handler
wdinfo | Verb | information box
wdmove | Verb | position window, relative to side of screen
wdpclose | Verb | close parent window
wdqshow | Verb | display result of wdq
wdquery | Verb | query box
wdselect | Verb | selection box
wdstatus | Verb | put status message on screen
wdview | Verb | text viewer

wd.................. (v) main window driver, name for 11!:0

wdreset............. (v) reset window driver

wdclipread.......... (v) read clipboard

wdisparent.......... (v) return 1 if a parent window

wdbox............... (v) box wd argument

use this to analyze arguments to wd
in code: whs=whitepace, del=delimiters

wdcenter............ (v) center form on another

form: wdcenter xywh
use this to center a form on another

wdclipwrite......... (v) write to clipboard

wde................. (v) as wd but displays error and signals break

wdfit............... (v) fit form in window

y. is two integers for horizontal and vertical
in each case, the entire form will be shown

values are:
  0   move the side out of view back into the window
      - typically reduces the form size
  1   move the form so it is all visible
      - typically leaves the form size unchanged
  2   stretch the form to the window
  3   maximize the form to full screen, hiding caption and borders

an empty argument is treated as 1 1

wdget............... (v) get values from matrix, e.g. wd'q'

utility to index 2-column boxed array, e.g. result of wd 'q'
form:  names wdget data
returns items in second column indexed on names in first column
result is boxed if left argument is boxed
e.g. 'sysfocus' wdget wdq

wdhandler........... (v) wd handler

runs in form locale
sets global event data: wdq
runs first found of: form_handler, form_event, form_default,
with global event variables from wdq
if debug is off, wraps event handler in try. catch.
catch exits if error message is the last picked up by debug.

wdinfo.............. (v) information box

syntax: wdinfo [title;] message

wdmove.............. (v) position window, relative to side of screen

form: [window] wdmove offset

offset is the xy offset.
  if  >: 0  the offset is from topleft
  if  < 0   the offset is from bottomright (less 1)

e.g.
    0 0  = topleft
  _1 _1  = bottomright
   5 _11 = 5 from left, 10 from bottom

wdpclose............ (v) close parent window

wdqshow............. (v) display result of wdq

display wdq result - useful for testing forms

wdquery............. (v) query box

form: [opt] wdquery [title;] message
  opt has one or two elements:
   0{  = 0    okcancel          (ok=0 cancel=1)
         1    retrycancel       (retry=0 cancel=1)
         2    yesno             (yes=0 no=1)
         3    yesnocancel       (yes=0 no=1 cancel=2)
         4    abortretryignore  (abort=0 retry=1 ignore=2)
   1{ = default button (0, 1 or 2)

wdselect............ (v) selection box

windows selection box

y. is a either:   boxed list of choices
            or:   title ; <boxed list of choices
   if y. is empty, closes selection box if open.

x. is optional of up to 3 values (default 0). the second and
   third options are only referenced when the box is created:
  0{ initial selection
  1{ 0=single selection, 1=multiple selection
  2{ 0=close on exit, 1=leave open if selection made

returns 2 item boxed list:
  0{ 0=cancel, 1=accept
  1{ indices of selections

wdstatus............ (v) put status message on screen

write status message on screen

{title} wdstatus message    - write message
        wdstatus ''         - close message box

default text size is 1 row of 50 characters.
for a larger size, call wdstatus initially with a message
of the required size (pad with blanks if necessary).
once created, the message box is not resized.

wdview.............. (v) text viewer

y. is text  or  header;text [;wrap;print;top (default 0 1 0)]
x. is optional window name
uses standard Windows edit control,
which is limited to around 20K in size.

system\main\winlib.ijs Release: 4.05/2000-12-01/10:35


COLOR16

table of 16 primary colors supported by HTML

Defined items
Name Class Description

system\packages\color\color16.ijs Release: 4.05/2000-12-01/10:35


COLORTAB

main colortable used in J

colors supported by Internet Explorer
+ solid system colors

Defined items
Name Class Description

system\packages\color\colortab.ijs Release: 4.05/2000-12-01/10:35


CSV

read/write comma-separated value data (*.csv) files

main definitions:
     readcsv file    - reads data into a boxed array
 dat writecsv file   - writes a boxed array to a csv file

requires: files strings

Defined items
Name Class Description

system\packages\files\csv.ijs Release: 4.05/2000-12-01/10:35


JFILES

Component File definitions

built from project: source\packages\jfiles\jfiles

Defined items
Name Class Description

system\packages\files\jfiles.ijs Release: 4.05/2000-12-01/10:35


KEYFILES

Keyed-file definitions

See also jfiles
built from project: source\packages\keyfiles\keyfiles

Defined items
Name | Class | Description
keycreate | Verb | create file
keydir | Verb | keyword directory
keydrop | Verb | drop keywords
keyerase | Verb | erase file
keyread | Verb | read data
keywrite | Verb | write data
keyreadx | Verb | read extra data
keywritex | Verb | write extra data
key_new | Verb | make new components

keycreate........... (v) create file

keydir.............. (v) keyword directory

keydrop............. (v) drop keywords

keyerase............ (v) erase file

keyread............. (v) read data

keywrite............ (v) write data

keyreadx............ (v) read extra data

keywritex........... (v) write extra data

key_new............. (v) make new components

form: key_new number, handle, used

system\packages\files\keyfiles.ijs Release: 4.05/2000-12-01/10:35


KFILES

Keyed-file definitions

See also jfiles
built from project: source\packages\kfiles\kfiles

Defined items
Name | Class | Description
kcreate | Verb | create file
kdir | Verb | keyword directory
kerase | Verb | erase file
kread | Verb | read data for keyword
kwrite | Verb | write date for keyword

kcreate............. (v) create file

kdir................ (v) keyword directory

kerase.............. (v) erase file

kread............... (v) read data for keyword

kwrite.............. (v) write date for keyword

system\packages\files\kfiles.ijs Release: 4.05/2000-12-01/10:35


NFILES

file read/write in various formats

read files in various formats
write files in J internal formats

 [opt] nread fl      read file
  dat  nappend fl    append file
  dat  nwrite fl     write file

  opt = 11    1-bit boolean
        82    8-bit character
        163  16-bit integer     (read only)
        323  32-bit integer
        645  64-bit floating point

1-bit booleans are assumed of length a multiple of 8,
i.e. an integral number of bytes

data types supported are: boolean literal integer floating

Defined items
Name Class Description

system\packages\files\nfiles.ijs Release: 4.05/2000-12-01/10:35


ISIGRAPH

loads all isigraph files

Defined items
Name Class Description

system\packages\graphics\isigraph.ijs Release: 4.05/2000-12-01/10:35


ODBC

built from project: source\api\odbc\odbc

Defined items
Name Class Description

system\packages\odbc\odbc.ijs Release: 4.05/2000-12-01/10:35


LASERJET

LaserJet utilities

The LaserJet utilities support printing to a laserjet with output
sent directly to the printer port, e.g. LPT1. You should ensure
this does not conflict with other tasks, e.g. Windows Print Manager.

The printer port is defined in script file: ljutil.ijs

The utilities set symbolset PC8 (includes PC linedraw characters).

opt ljprint data        print data to LaserJet
                        opt is optional, and may have 1 or 2 values:
                          0 = 0=portrait, 1=landscape
                          1 = 0=normal, 1=condensed

    ljprint2 data       print data in 2-up mode

opt ljprintfile files   print files
                        opt as for ljprint

    ljprintfile2 files  print files in 2-up mode

opt ljset cmd           set up LaserJet (ljset '' for commands)
                        opt is optional:
                          0=send commands to printer port (default)
                          1=return printer commands only

    lpt data            send data directly to printer port

Defined items
Name Class Description

system\packages\print\laserjet.ijs Release: 4.05/2000-12-01/10:35


PRINT

print package

built from project: source\print\print\print

Defined items
Name Class Description

system\packages\print\print.ijs Release: 4.05/2000-12-01/10:35


WRITE

write package

built from project: source\print\write\write

Defined items
Name Class Description

system\packages\print\write.ijs Release: 4.05/2000-12-01/10:35


PUBLISH

Publish J code to HTML

Defined items
Name  | Class  | Description
publish  | Verb  | interactive publisher

fmtlines  | Verb  | format lines of J code

fmtscript  | Verb  | format script

fmtscriptto  | Verb  | format script

publish............. (v) interactive publisher

  publish ''   or   publish 'scriptname'

fmtlines............ (v) format lines of J code

  fmtlines 'J code'

fmtscript........... (v) format script

  fmtscript 'script.ijs'  NB. saved as script.htm

fmtscriptto......... (v) format script

  'script.ijs' fmtscriptto 'output.htm'

system\packages\publish\publish.ijs Release: 4.05/2000-12-01/10:35


STATS

load statistics files

Defined items
Name Class Description

system\packages\stats\stats.ijs Release: 4.05/2000-12-01/10:35


MENU

built from project: source\api\menu\menu

Defined items
Name  | Class  | Description
AppendMenu  | Verb  | win32api

CreatePopupMenu  | Verb  | win32api

TrackPopupMenu  | Verb  | win32api

DestroyMenu  | Verb  | win32api

createmenu  | Verb  | create menu, returning handles

wdmenu  | Verb  | provide pop-up menu

AppendMenu.......... (v) win32api

bool=. AppendMenu h;fl;id;str

CreatePopupMenu..... (v) win32api

h=. CreatePopupMenu ''

TrackPopupMenu...... (v) win32api

id=. TrackPopupMenu h;fl;x;y;0;(".wd'qhwndp');<,0

DestroyMenu......... (v) win32api

bool=. DestroyMenu h

createmenu.......... (v) create menu, returning handles

x. = offset, blocksize

wdmenu.............. (v) provide pop-up menu

system\packages\winapi\menu.ijs Release: 4.05/2000-12-01/10:35


WINAPI

built from project: source\api\api\api

Defined items
Name  | Class  | Description
win32api  | Adv  | look up Win32 API declaration, returning verb

win32apir  | Adv  | win32api, except verb returns first element of call result

winconst  | Verb  | look up Windows constants

winset  | Verb  | set values of windows constants

win32api............ (a) look up Win32 API declaration, returning verb

e.g.
   'GetProfileStringA' win32api
'kernel32 GetProfileStringA i *c *c *c *c i'&(15!:0)
   >'GetVersion' win32api ''
_1073741820

win32apir........... (a) win32api, except verb returns first element of call result

winconst............ (v) look up Windows constants

returns 2-element list: values ; names
e.g. winconst 'EM_GETMODIFY EM_SETMODIFY'

winset.............. (v) set values of windows constants

system\packages\winapi\winapi.ijs Release: 4.05/2000-12-01/10:35