Re: A file

 BBS: Inland Empire Archive
Date: 02-13-93 (14:52)             Number: 327
From: DICK DENNISON                Refer#: NONE
  To: JEFFERY FOY                   Recvd: NO  
Subj: Re: A file                     Conf: (2) Quik_Bas
JF> Btw, to keep on topic... Here's a challenge... Without using MID$,
JF> LEFT$, RIGHT$, or INSTR, reverse the characters in a 10-byte string su
JF> that:  "0123456789" becomes "9876543210".  I thought it'd be easy but
JF> find that it isn't... :)

a$ = "0123456789"
y = LEN(a$)
Segment% = VARSEG(a$)
offset% = SADD(a$) + y
def seg = Segment%
FOR x = 1 TO LEN(a$)
   PRINT CHR$(PEEK(offset% - x));
Def Seg

--- VP [DOS] V4.09e
 * Origin: The MailMan  (914)374-3903 NY Quick Share Pt #7 *HST (1:272/34)
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