Confusion #2

 BBS: Inland Empire Archive
Date: 04-29-92 (14:31)             Number: 195
From: ROB FLOR                     Refer#: NONE
  To: DON KROUSE                    Recvd: NO  
Subj: Confusion #2                   Conf: (2) Quik_Bas
>-> SUB PrintFast2 (Rows%, Col%, Msg$, atrib%)
>->

Nice routine.  In PDQ it's even better since you can assign the SADD to
a variable before entering the loop because the strings don't move
around.

Makes an excellent IntStr% function, quicker than INSTR
for single character searching.  Faster even than PDQ's MIDCHAR.


FUNCTION IntStr%(Msg$, Search%)
    StrADDr%=SADD(Msg$)
    FOR I% = 0 TO LEN(Msg$) -1
    IF Search%=PEEK (StrADDr%) THEN EXIT FOR
    NEXT
If I% THEN IntStr% = I% + 2
END FUNCTION



   Rob


 * OLX 2.2 * The Trying of Vat 49
---
 * Origin: * Info-Center BBS * (914)567-1814  >>HST<< * (1:272/26)
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