Prototype 3/3

 BBS: Inland Empire Archive
Date: 04-10-93 (08:26)             Number: 333
From: RICH GELDREICH               Refer#: NONE
  To: VICTOR YIU                    Recvd: NO  
Subj: Prototype 3/3                  Conf: (2) Quik_Bas
'>>> Start of page 3.

L4$ = "NEXT:L&=L&+100:?L&\" + MID$(STR$(LinesWritten), 2) +_
 ";CHR$(29)"
L4$ = L4$ + Q$ + "%" + Q$ + ";:LOCATE,1:END SUB"

    PRINT #2, L1$
    PRINT #2, L2$
    PRINT #2, L3$
    PRINT #2, L4$

END SUB

SUB EncodeStart

    k = 1
    FOR a = 0 TO 7
        Power2(a) = k
        k = k * 2
    NEXT

    GoodChars$ = "abcdefghijklmnopqrstuvwxyz"
    GoodChars$ = GoodChars$ + UCASE$(GoodChars$) + "0123456789()"

    OutputLine$ = "G" + CHR$(34) + SPACE$(63)
    OutputPos = 3

    FOR a = LEN(I$) TO 1 STEP -1
        IF INSTR("\:", MID$(I$, a, 1)) THEN EXIT FOR
    NEXT
    P$ = UCASE$(MID$(I$, a + 1))

    Q$ = CHR$(34)

L0$ = "'This prototype PostIt! script was created on " + DATE$ +_
 "."

L1$ = "DEFINT A-Z:T$=" + Q$ + "abcdefghijklmnopqrstuvwxyz" + Q$_
 + ":F$=" + Q$ + P$ + Q$

L2$ = "OPEN" + Q$ + "O" + Q$ + ",1,F$,8192:DIM SHARED"+_
" Q,T(7,122),R,I,L&,K"
L2$ = L2$ + ":T$=T$+UCASE$(T$)"

L3$ = "T$=T$+" + Q$ + "0123456789()" + Q$ + ":FOR B=0 TO"+_
" 7:M=2^B:Z=0"
L3$ = L3$ + ":FOR A=1 TO 64"

L4$ = "T(B,ASC(MID$(T$,A,1)))=Z:Z=Z+M:NEXT A,B:Q=255:?"
L4$ = L4$ + Q$ + "Extracting " + Q$ + "F$"

    PRINT #2, L0$
    PRINT #2, L1$
    PRINT #2, L2$
    PRINT #2, L3$
    PRINT #2, L4$

END SUB


'________O_/________________________| SNIP
|______________________\_O_______
'        O \                        | HERE |                      / O

Could you decrease the size of this ^^^^^^^ in the next version? Looking
back at my posted message, I noticed that it gets badly cut off because
it's larger than 65 characters or so.

    I'm working on a way to meet Coridon's challenge and increase the
maximum script size to 64k or so... It might involve assembly.

    Rich

--- MsgToss 2.0b
 * Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET