From: "Christian Meland" <christian.meland@pfi.no>
Newsgroups: comp.sys.hp48
Subject: KEEP program (extended UNDO)
Date: 9 Nov 1998 09:54:56 GMT
Organization: PFI
Lines: 104
Message-ID: <01be0bc8$0ba2b590$9916f181@r286>
NNTP-Posting-Host: pfi-dhcp-153.pfi.no
X-Trace: snipp.uninett.no 910605296 7210 129.241.22.153 (9 Nov 1998 09:54:56 GMT)
X-Complaints-To: news-abuse@uninett.no
X-Newsreader: Microsoft Internet News 4.70.1161
Xref: republic.btigate.com comp.sys.hp48:18354

Hi. This is a program shell around the JAZZ command DTEMP. Usage: Input an
object. Output are all valid objects in tempob of the same type as
inputobj, or if input is a real, that spesific (internal) type ( 1=real,
2=complex, 3=string, 4= array, 5=list ...) and a counter.

If I enter some data, then drop it, do something else and then need the
data again, I may be lucky and find it by entering

[1] or 4 (both mean array)
KEEP

or "" (0r 3, string)
KEEP

remember that all input from the command line are treated as a string
first, but there are usually a LOT of strings in tempob.


Christian

-- 
Christian Meland
Research Scientist, PFI
N-7034 Trondheim, Norway
Phone +4773550976, at home +47 73922526

::
 CK1NoBlame
 DTYPEREAL?
 ITE
 COERCE
 CODE			* This is the code object in ITYPE from HACK. Replace with xITYPE if you have HACK
	GOSBVL	=PopASavptr
	D1=A
	C=DAT1	A
	D=C	A
	LC(5)	=#*OVF
	B=C	A
	LC(5)	#19128
	A=0	A
L98ACA	A=A+1	A
	D1=C
	C=DAT1	A
	?D=C	A
	GOYES	L98AE7
	D1=D1+	5
	CD1EX
	?B>C	A
	GOYES	L98ACA
	A=0	A
	GONC	L98AF9
L98AE7	C=0	A
	LC(1)	#F
	?C>=A	A
	GOYES	L98AF9
	A=A-C	A
	ASL	A
	A=A!C	A
L98AF9	GOVLNG	=PUSH#ALOOP
ENDCODE
 '
 CK&DISPATCH1
 SWAP
 TRUE
 ZERO
 'DROPFALSE
 FIVE
 ::N
 DEPTH
 #1-
 '
 NULLLAM
 TWO
 NDUPN
 DOBIND
 xDTEMP
 DEPTH
 1GETLAM
 #-
 DUP
 1PUTLAM
 #1+_ONE_DO
 2GETLAM
 EVAL
 ?SKIP
 ::
  1GETLAM
  #1-
  1PUTLAM
 ;
 1GETLAM
 ROLL
 LOOP
 1GETABND
 UNCOERCE
;


-- 
Christian Meland
Research Scientist, PFI
N-7034 Trondheim, Norway
Phone +4773550976, at home +47 73922526