Newsgroups: comp.sources.hp48 Path: funic!news.funet.fi!fuug!mcsun!hp4at!news.univie.ac.at!paladin.american.edu!gatech!concert!seq!spell From: Carlos Ferraro Subject: v08i031: util.cf - UTIL v2.6 - set of nice programs, Part01/01 Message-ID: <1993Jan31.211539.23885@seq.uncwil.edu> Followup-To: comp.sys.hp48 Sender: spell@seq.uncwil.edu (Chris Spell) Organization: Univ. of North Carolina @ Wilmington Date: Sun, 31 Jan 1993 21:15:39 GMT Approved: spell@seq.uncwil.edu Lines: 253 Checksum: 2847469605 (verify with brik -cv) Submitted-by: Carlos Ferraro Posting-number: Volume 8, Issue 31 Archive-name: util.cf BEGIN_DOC util.doc version 2.6 (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 - 5 X 7 - 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. 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 1115 , # E347 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. Thanks to ... ... Detlef Mueller for his friendship, <-LIB-> and <-RPL->, as well as many suggestions ! END_DOC BEGIN_ASC util.asc %%HP: T(1); "04B201B80051554594C40202A30223E26302341627C6F637729333516C427700 000007270050000D9D20119206C40090770B2130D9D20CF126A2170D9D20FEF3 0FC436D50405573552140A59714512688130CB916D9D20D504052735B2130A21 70D3B512A1707A72190236EF116F655064B302FA30EE170D9D202A170BB72670 14038D30D50408773564B30EE170D9D20881309FF30701403375052456EE250C AF0611140D62366B316FED300E516B21305E1706B316FED300E51632230B2130 5E170852306B316698164AE4024F506B3161962642D46F85116B4363C3703223 008F112C230FEF30F2815E0E30196269761143370B213049F219E550F20F479E 60634E1A8F02B2130D9D201323647A2003D4303D43B21300D4706B316BD3707E 31612270C9B26112268DA1629E206C4900D9D20D6E20200527E8F60B21304337 06B43695450B213086C4800D9D20ECE8112040D9D201323632230FC436BD3706 B31612270C9B26112268DA1688B26D9D2039126CB916D9D20BA0D144230B2130 B21304337079470B2130B213086C4700D9D20AEC81ED4E0B213086C4600D9D20 E8E60B213086C4500D9D20ECE8112040D9D2013236FBD812C230980508B9C1EB 3A1881309C2A21C8A28DA16D9D2085230FA450FBD81C20D1B2130D9D209B136F C43629E206C48006B436040D1B2130B2130B213086C4400D9D20ECE8171040D9 D20BA0D188130A3AC19C2A2CC8A28DA16D9D2088B267F4919E55047A2003D430 3D43B21300D470BD3707E31617040877358DA16D9D20FBD81C20D1B2130D9D20 95450B2130DEE326B316F12500E516433706B31679470B2130D9D2088B26AEC8 195450B2130B2130B213086C4300D9D20ECE81B2040D9D2018B0229E206C4A00 B213053040D9D2018B0229E206C4A00B213071040546A3FEF3029E206C4A00B2 13086C4200D9D205AA812A17088130C0A751BF2679B308C1702A1708813009D7 51BF2679B308C170B213086C4100D9D2008A813223039126CB916D9D20170405 573529E206C4400B213011226DA916D9D20322302BC81B213032230881309C2A 2E2B30CB916D9D204423079E6029E206C4200B213047A20D6E20200527B21300 D47029E206C490079470B213086C4000D9D205AA8124F50AFBC047A20D6E2050 5467459646B21300D470EB3A1AFBC0D6E20505467459646794708C6A28813006 FA28B261C2A20D0000028627023915032230D4FA21F514CB9A28813006FA28B2 61C2A20D000002D696E63915032230D4FA21F514CB9A2803A2925B28B261C2A2 0D00000237563639150B642139150B5421C2093B2130E4A20C3000AEEFF12EFF ACDFF75DFF56CFF2CBFF7ABFF78BFF9FAFFE6AFF0C8FFE4A2000100000000000 0B40007600098000390000000000000000000000000000000000000000000000 0000000E70003014D8C440030C4D81450030C4C4D880040052509C4100405485 34F4200404454C4E4700504594D454F300060659454755425300601534F4C434 4560013000D50005500013000D800078000F200016000B80009354743E" END_ASC BYTES: #E347 1115 BEGIN_UU util.uue begin 644 util.lib M2%!(4#0X+45`*Q"+`!555$E,("`Z(#(N-B!#87)L;W,G.3,5QB1W````<'(` M!0#0V0(1*6!,``EWL!(#G2W`'V(J<=#9`N\_\$QC74!0=5,E0:"5%U0AAA@# MO!G6V0)=0%!R4RLQH!('/5LA&@>G)Y$@8_X1]E8%1CL@KP/N<=#9`J)QL'MB M!T$PV`-=0(!W4T8[X!X'G2V`&`/Y/W`0!#-74$)E[E+`^F`10=`F8[83]MX# MX!6V$@/E<6`[8>\]`%YA(S*P$@/E<8`E`[839HEAI$X@]`6V$Q9I8B1-]E@1 MMC0V/`V$[8]!^<3%B('G"L6(6+8&B;I`L:4`)TM MT.8"`E!RCF^P$@,TY+`2`VA,!M#9`HYNL!(#:$P%T-D"SHX1`@2=+1`C8[^-(2P# MB5"`FQR^HX$8`\FB$HPJV!K6V0)8,O!*!;^-P0(=*S'0V0*Y,?9,8Y(N8$P( M8$MC0-"Q$@,K,;`2`VA,!-#9`LZ.<0$$G2VP"AV(,:"C',FBPHPJV!K6V0*( M*W9/&>E50*<",$T#TS0K,0!-!]MS<#YA<4"`=U/8&M;9`K^-P0(=*S'0V0)9 M5+`2`^T^8CMA'U(`7F$TA7[8I<[@!P'HG&`&`.0?17[8I<[@!P' M*S&`QA0`G2T`J!@C,C`98KP9UMD"<4!0=5.2+F!,!+`2`Q$BUIIAG2TP(@.R MC+$2`R,R@!@#R:+BL@.\&=;9`D0R<.D&DBY@3`*P$@-T*M#F`@)0