[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleSoft Basic to text-- BASIC xfer



bobryan9@my-deja.com writes ...
> 
> > For transfer of the pure Text 'source' of an Applesoft BASIC program,
> > the CR character seems to be the only Control character one encounters.
> > However, if any others occur (e.g. LF's, etc. added by the particular
> > Text editor) they are not BASIC and should be screened out, too.
> > This is the reason for the IF  ASC (C$) < 32 THEN test.
> 
> My .02:
> 
> I've seen ^D, ^G, ^M, and a few others in BASIC programs before.

     Right! Forgot about those. (Except, an embedded ^M is kind of unusual
and, normally, difficult to enter.)  Some programmers also embed line feeds
and back/forward cursor moves.


> Bugged me for a long time that in a game I had on a PD disk, one line
> was 530 PRINT "YOU WON", and each time the program got it it it beeped
> 5 times!!  I set breakpoints up all over trying to figure out how to
> make it beep.  I'd never made my apple make a sound before.  I finally
> read a book that told how to put beeps in a print statement .
> 
 ....

     Every new programmer seems to love to use the feature which allows
typing in CTRL-G to enter a BEEP and other such shortcuts. Eventually, you
notice how hard it is to read listings and debug such programs and you knock
off cutesie stuff and just enter CHR$(7), etc. or a string substitute.

     The transfer program could go with Jeff's idea of checking for ^M and
passing other control chars. That would work for nearly all pure Text
produced on an Apple II. It would not work for Apple II Text produced on an
editor which adds control chars or for pure PC-generated Text.

     Since the objective is to have a way for Rich to transfer his robot
programs, the best approach would depend upon whether or not the programs
contain embedded in-line control codes. If they do not, then the original
version of the program is safer.



Rubywand