MsgSplit 2.00

 BBS: Inland Empire Archive
Date: 02-13-93 (14:14)             Number: 385
From: SCOTT WUNSCH                 Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: MsgSplit 2.00                  Conf: (2) Quik_Bas
Part 2 of MSGSPLIT.BAS - continued from last message...

OPEN FileName$ FOR INPUT AS #1
LinesOut = Reserve + 1
OnMsgNumber = 1
LPP = LPP - 4   ' lines per page

DO
    Temp$ = LTRIM$(STR$(FileOutNum))
    IF BW THEN
        Ext$ = "000": MID$(Ext$, 4 - LEN(Temp$)) = Temp$
    ELSE
        Ext$ = Temp$
    END IF

    OPEN OutN$ + "." + Ext$ FOR OUTPUT AS #2

    IF OnMsgNumber > 1 THEN
        PRINT #2, "Part"; OnMsgNumber; "of "; FileName$; " - continued"+_
" from last message..."
        PRINT #2,
    ELSE
        PRINT #2, " Part one of "; FileName$; "..."
        PRINT #2, "________O_/________________________| SNIP"+_
" |______________________\_O_______"
        PRINT #2, "        O \                        | HERE |            "+_
"          / O"
        PRINT #2,
    END IF

    TooLong = False
    FOR Trans = LinesOut TO LPP
        IF NOT EOF(1) THEN
            IF Trans = LinesOut THEN
                DO: LINE INPUT #1, Buf$
                LOOP WHILE LEN(Buf$) = 0
            ELSE
                LINE INPUT #1, Buf$
                Buf$ = RTRIM$(Buf$)
            END IF

            Tb = INSTR(Buf$, Tab$)  'remove those dang chr$(8)s (tabs)
            IF Tb THEN
                DO
                    Buf$ = LEFT$(Buf$, Tb - 1) + TabSub$ + MID$(Buf$, Tb + 1)
                    Tb = INSTR(Tb, Buf$, Tab$)
                LOOP WHILE Tb
            END IF

Wrapping:
            IF LEN(Buf$) > 80 THEN
                FOR A = 75 TO 40 STEP -1
                  IF MID$(Buf$, A, 1) = " " THEN
                    WrapPoint% = A: EXIT FOR
                  END IF
                NEXT A
                QuotesOn% = 0: Quote$ = CHR$(34)
                FOR A = 1 TO WrapPoint%
                  IF MID$(Buf$, A, 1) = Quote$ THEN QuotesOn% = NOT QuotesOn%
                NEXT A
                IF QuotesOn% THEN
                  Long$ = Buf$
                  Buf$ = LEFT$(Buf$, WrapPoint% - 1) + Quote$ + "+_"
                ELSE
                  Long$ = Buf$
                  Buf$ = LEFT$(Buf$, WrapPoint% - 1) + "_"
                END IF
                IF NOT ((Trans = LPP) AND LEN(Buf$) = 0) THEN
                  PRINT #2, Buf$
                END IF
                Buf$ = MID$(Long$, WrapPoint%)
                IF QuotesOn% THEN Buf$ = Quote$ + Buf$
                IF LEN(Buf$) THEN GOTO Wrapping
            END IF
            IF NOT ((Trans = LPP) AND LEN(Buf$) = 0) THEN
                PRINT #2, Buf$
            END IF
        END IF
    NEXT
    IF NOT EOF(1) THEN
        PRINT #2,
        PRINT #2, "Continued on next message..."
    ELSE
        PRINT #2,
        PRINT #2, "________O_/________________________| SNIP"+_
" |______________________\_O_______"
        PRINT #2, "        O \                        | HERE |            "+_
"          / O"
        PRINT #2, "  Line wrapping and message splitted accomplished by"+_
" MsgSplit 2.00,"
        PRINT #2, "a Victor Yiu and Scott Wunsch creation."
        PRINT #2,
    END IF
    IF TooLong THEN

Continued on next message...

---
 * Origin: That's beside the point -=- Regina, Sask, Canada (1:140/23.1701)
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