From: tinywanda@aol.com (TinyWanda)
Newsgroups: comp.sys.hp48
Subject: Re: SCI level-1 display (small useful progs!)
Lines: 80
NNTP-Posting-Host: ladder01.news.aol.com
X-Admin: news@aol.com
Date: 14 Nov 1998 03:22:11 GMT
Organization: AOL http://www.aol.com
References: <01be0d4c$856ad800$9916f181@r286>
Message-ID: <19981113222211.01931.00000198@ng112.aol.com>
Xref: republic.btigate.com comp.sys.hp48:18539

Here are 3 display routines that take an object on 1: and modifies it somehow
and then pastes it back on the display in a new format in such a way that it's
slightly illegal...!!! 
For viewing purposes only...!

Name:          ->Sci
Takes an Object on 1: and converts it to SCI notation while leaving everything
else on the stack in a pre-SCI format...!
To escape, hit any key, and that will return the object on 1: to it's former
state...!


<< RCLF OVER 4 SCI
->STR
"1:                    " @ 20 Spaces
1 22 4 PICK SIZE -
SUB SWAP + 3 ->GROB
LCD-> { # 0d # 46d }
ROT REPL ->LCD 0
WAIT DROP STOF
>>
-------------------------------------------: <<

Name:            ->q
This is used with the general solution program ->One to display a decimal
fraction as an integer fraction.

Before:
3:               123
2:         "Bite me"
1:              2.25

After
3:               123
2:         "Bite me"
1:             2 1/4


<<
  <<  STD DUP IP " "
+ 4 FIX SWAP FP ->Q
->STR 2 OVER SIZE 1
- SUB +
 >> ->One
>>
-------------------------------------------: <<

Name:          ->One
The general solution.
Takes 2 objects;
The object to be acted on,
And the modifing function or program.

2:            object
1:      << program >>


<< RCLF 3 PICK ROT
EVAL ->STR
"1:                    " @ 20 Spaces
1 22 4 PICK SIZE -
SUB SWAP + 3 ->GROB
LCD-> { # 0d # 46d }
ROT REPL ->LCD
  IFERR 0 WAIT
  THEN
  END DROP STOF
>>
-------------------------------------------: <<






----------- :: o
.---..-..-..-..-..-..-.  .  .-. .-.  .-..-..-..   .-.  
`| |'| || .` | >  /  \ \/ \/ / /   \ | .` || | ) /   \ 
 `-' `-'`-'`-' `-'    `. ^ .' `--^--'`-'`-'`-'' `--^--'
Join The BabyNous Cult : The Friendly Neighborhood Cult