BEGIN_DOC_UTIL_version_2.7

(Not sure of which version you have? Hit REVIEW once you are 
in the LIBRARY menu !)

Hello everybody!


                                                    Gothenburg , January 93


First, I would like you to appologize all linguistical errors in this doc
or any of the previous. English is not my native language ! :)

Changes with respect to versions 2.1 -> 2.3 :
=============================================
1) ->PICT is practically completelly rewritten, being much more "memory
saver" and offering a much better presentation
2) QCOLCT doesn't exist anymore - see below
3) LL-> , L->A and A->L much more advanced
4) Small changes everywhere in order to improve speed or size


Changes with respect to versions 2.3 -> 2.5 :
=============================================
1) ->PICT now even better presentation for strings, and called
instead VIEWER
2) DELN is now simply a PTR , thus, as small as it could be :)

________________________________________________________________________________

Copyright 1993  Carlos Ferraro
All Rights Reserved

DISCLAIM :

UTIL and this manual are presented as is, without warranties, expressed or 
implied.  The author makes no guarantee as to the fitness of this software.

UTIL can be copied freely,  provided the software, including this 
manual, is copied in its entirety.  The user cannot be charged, in whole or in 
part, except for the cost of reproduction.  No part of this package may be 
used for commercial purposes without written permission from the author.

I tryed - and hopfully managed - to use only Supported Entries .

________________________________________________________________________________


This is a little (only 1115 bytes) and very fast (full sys-rpl !)
xlib providing some good utilities that you'll certainly have
use for, specially if you'd like to use my SYMB or LINAL libraries :)


1) TIME? - will return the evaluation time of a program as a message in the 
status area with the
following syntax: " x hr y min
                    z.zzz sec"

The program must be at level one, of course, and you can evaluate the 
running time of almost any HP function and/or xlib by putting it in brackets 
(program-signs).
In:
?: ( all the necessary arguments required by the object at level 1 in as many 
stack levels as necessary and in the necessary order.)
1: << a program , function, or command here >>

2) PR|^L - a program applied to an array or a list containing anything :
lists, algebraics, programs, vectors,etc , element by element.
The program preserves the original list shape of all the lists in in it.
OBS! If the program you give isn't executable for one of the elements in
the list or in one of the embedded lists, then PR|^L will stop at that element,
leaving it in the stack.
Giving a 1 is a shortcut for EXCO.
In: 2: See above!
 1: << any program here >> or a 1 .

EXAMPLE: Apply the program << TYPE >> to this list:
In: 2:{ '2*X' { [ 1 2 3 ] << DUP SIN + >> } 234 { "Hello" } }
 1: << TYPE >>
Hit PR|^L and you'll get { 9 { 3 8 } 0 { 2 } } after 0,512 seconds !
As you certainly understand, this is specially good to apply EXCO
to a "symbolic matrix" as described in the document of my SYMB 
library !

EXAMPLE2: Applay the program << ->Q >> to all the elements of a matrix:
simply put the matrix at level 2 and the little prog above at level 1 and
hit PR|^L . The result is a list containing the algebraic expressions
for every element. (For a more effective and advanced variant of this
little example, get the program mailed together with my LINALLIB ! )

3) EXCO - almost the same good old EXCO as everybody else implements 
from the manual, BUT pure sys-RPL !! No program is called from this one 
(unlike in the manual). For applying EXCO to all the elements in a symbolic
array or whatever, simply put that list at level 2 and a 1 (one) at
level 1 and hit PR|^L !

4) VIEWER - This is a program who will display any object at level1
as a "scrollable" PICT , with a nice presentation - right indentation if
it's a program. The font is the smallest one - 3 x 5 - and the PICT
will be "scrollable" only in "north-south" direction, in order to save
memory. If a string is bigger then so, 3 dots will be appended to it
and it'll continue at next row. Althought this new version uses
much less memory than the former, consider that a PICT of a 600 bytes
user-RPL prog wil take about 3.6 Kb !

5) A->L - (Array to List) - converts a real or compl. array in HP48-shape into 
one in "symbolic" shape (list of lists), or into a list of vectors
if UserFlag 13 is set. Any dimensions.
In: 1: A matrix or a vector
Out: 1: A list of lists, or a list of vectors, or a list

6) L->A - (List to Array) - the opposite of A->L . Obviously you can NOT
transform any symbolic array with non-numerical values into a HP48-matrix.

These programs below are hidden (but can be written) so you don't
make any misstakes, cause they don't have any error checking !!

7) QCOLCT - I removed the program - left only a NOP - because it didn't
seem to be very usefull for the majority . But I didn't want to
change all the ROMPTRs in SYMB calling LL-> and DELN so ...

8) DELN - Deletes the n-th  element from a list.

9) LL-> - List containing anything splitted to stack. If the list contains
lists or vectors, those will be splitted too (but only once - no recursion)
EXAMPLE: { 2 { 4 5 'n+3*m' } [ 6 7 ] { { 9 } } } will resul in
the elements 2 , 4 , 5 , 'n+3*m' , 6 , 7 , { 9 } in the stack.


FOR YOU WHO AREN'T USED TO LIBRARIES :
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

INSTRUCTIONS FOR DOWNLOADING:
( This time I don't include the nice GROB-labels , since almost everybody
has it already. If you don't have it and want it, give me a call. )
1) uudecode or ASC-> the corresponding versions and send it to the 48
2) call the contents of the UTILLIB to the stack
3) purge the variable containing UTILLIB  (optional)
4) enter 0 or 1 or 2 (corresponding to the desired port) and hit STO
5) turn the calculator OFF
6) turn the calculator ON

The library is now installed !
If (3) wasn't done, do it now (to save bytes)

INSTRUCCIONS TO PURGE THE LIBRARY:
Althought I can't imagine why anybody would like to purge this beauty, 
here it is:
:&:1222 DUP DETACH PURGE
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Once the lib  is installed, the values are :
Library UTIL , LID 1222 ,  bytes 1128 , #  h

(Observe that this values are from taking "bytes" when the stack shows :
Library 1222 : UTIL)

As I'm tired of writing this program documentation, I hope you'll do
without more examples. If there's anything you wonder, below
is my e-adress.

END_DOC_UTIL


Thanks to ...
... Detlef Mueller for his friendship, <-LIB-> and <-RPL->, as well
as many suggestions !

Load the file UTIL_2.7 (binary)


+---------------------------------------------------------------------+
| carlos@fy.chalmers.se ~ Physics ~ University of Gothenburg ~ Sweden |
+---------------------------------------------------------------------+

