>> << Ndx Usr Pri Phr Dic Rel Voc !: wd Help User

# misc: miscellaneous utilities

Name | Type | Description
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
diff | verb | second differences
index | verb | index where result is _1 if not found, instead of #x.
join | verb | join boxed items
nubcount | verb | nub + count
pathname | verb | split DOS name into path;name
prompt | verb | prompt for input
scriptform | verb | script representation of names
show | verb | show names using linear representation
subs | conj | substitution
tolist | verb | convert boxed list to LF delimited list

addwmfheader

    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

    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

    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

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

index

    index where result is _1 if not found, instead of #x.
    example:
       'abc' index 'ce'
     2 _1

prompt

    prompt for input

    prompts for input, optionally with a default result

    form: [default] prompt prompt_text

    examples:
       prompt 'start date: '
     '2001 5 23' prompt 'start date: '

scriptform

    script 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

    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

    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)

>> << Ndx Usr Pri Phr Dic Rel Voc !: wd Help User