=========================================================================== BBS: The Abacus * HST/DS * Potterville MI Date: 02-27-93 (00:02) Number: 15 From: VICTOR YIU Refer#: NONE To: ALL Recvd: NO Subj: SpaceOut 1.0 ---> 3/3 Conf: (35) Quick Basi --------------------------------------------------------------------------- 'Part 3 of SPACEOUT.BAS - continued from last message... ' character, while the 2nd space will be by itself... ' ' The code below is very optimized: it uses direct manipulation of ' the string through PEEK/POKE and not MID$. It is as fast as ' you can get with pure QB. ' FUNCTION vy.Encode (Text$) Leng = LEN(Text$) IF Leng = 0 THEN Encode = True: EXIT FUNCTION Temp& = SSEG(Text$) ' Same here, too! Offset = SADD(Text$) DEF SEG = Temp& + Offset \ 16 Offset = Offset AND 15 After = Offset Char = PEEK(Offset) AND 127 Endd = Offset + Leng - 2 Abort = False FOR Byte = Offset TO Endd Nxt = PEEK(Byte + 1) AND 127 IF Nxt = 32 THEN Char = Char OR 128 Byte = Byte + 1 Nxt = PEEK(Byte + 1) AND 127 END IF POKE After, Char After = After + 1 Char = Nxt NEXT POKE After, (Char AND 127) DEF SEG NewLen = After - Offset + 1 Text$ = MKI$(LEN(Text$)) + LEFT$(Text$, NewLen) vy.Encode = True END FUNCTION '________O_/________________________| SNIP |______________________\_O_______ ' O \ | HERE | / O ' Line wrapping and message splitted accomplished by MsgSplit 2.00, 'a Victor Yiu and Scott Wunsch creation. That's it. Hope you like it. Victor ... OS/2 VirusScan - Windows Found: Remove it? (Y/y) --- Blue Wave/RA v2.10 [NR] * Origin: Hard Disc Cafe / Houston Texas / (713) 589-2690 / Node -*N (1:106/30. 0) SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1 SEEN-BY: 153/752 154/40 77 157/2 159/100 125 430 950 203/23 209/209 280/1 SEEN-BY: 390/1 396/1 15 397/2 2230/100 3603/20