TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mark Shumway
from: Bill Parker
date: 1995-01-07 04:02:46
subject: UU algorithm

SL>           putchar((a>4));
 SL> 
 SL> You should be able to figure out how to transliterate this into 
 SL> rexx.

 MS> So, how does one go about translating the shift-bit operations into REXX? 

I don't have a lot of experience with REXX but, from what I've seen so far,
it seems that HOW you choose to represent values is critical to determining
which operations are easy and which are difficult.

'a' and 'b' represent bytes that could be held in decimal strings
("0" through "255"), hex strings ("00"
through "FF"), binary strings ("00000000" through
"11111111"), single characters ('00'x through 'FF'x), etc.

If a and b are decimal strings then a>4 is b/16.

Hex strings might use B2X(RIGHT(X2B(a),6)||"00") and
"0"||LEFT(b,1).

Binary strings could be RIGHT(a,6)||"00" and "0000"||LEFT(b,4).

Single characters might use D2C((C2D(a)*4) % 256) and D2C(C2D(b)/16).

No idea which representation is best for the UU algorithm, usually I just
start with one approach and keep changing until I find the representation
that I hate the least.

Bill


--- Maximus/2 2.01wb
* Origin: Blue Bird Of Prey * Vergennes, VT * (802) 877-6912 (1:325/207)
SEEN-BY: 12/2442 620/243 624/50 632/348 640/820 690/660 711/409 410 413 430
SEEN-BY: 711/807 808 809 934 942 949 712/353 515 713/888 800/1 7877/2809
@PATH: 325/207 118 320/209 142/1 3615/50 229/2 12/2442 711/409 808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.