[comp.sys.apple] WRITEing ^D to a file

SEWALL@UCONNVM.BITNET (01/06/88)

 TMPLee@DOCKMASTER.arpa writes...
>Does anyone know if there is any way in basic (applesoft) under ProDos
>to get the D$ (chr$(4) or chr$(132)) character written out to a file?  I
>don't have a ProDos basic manual so don't know if there is any trick:
>neither doubling it nor following it with a carriage return, either of
>which seems a reasonable escape sequence, works.  .

I've never tried to do that, what happens if you enclose ^D in quotes?
as in:

100 PRINT "^D"  where the ^D is typed from the keyboard (somewhere I've
    got a routine that'll make the ^D appear as an inverse D in response
    to the LIST command.

---------------------
ARPA:   sewall%uconnvm.bitnet@cunyvm.cuny.edu       Murphy A. Sewall
BITNET: SEWALL@UCONNVM                          School of Business Admin.
UUCP:   ...ihnp4!psuvax1!UCONNVM.BITNET!SEWALL  University of Connecticut

jik@athena.mit.edu (Jonathan Isaiah Kamens) (01/07/88)

In article <8801051833.aa28043@SMOKE.BRL.ARPA> SEWALL@UCONNVM.BITNET writes:
>I've never tried to do that, what happens if you enclose ^D in quotes?
>as in:
>
>100 PRINT "^D"  where the ^D is typed from the keyboard (somewhere I've
>    got a routine that'll make the ^D appear as an inverse D in response
>    to the LIST command.

Won't work.  This accomplishes exactly the same thing as typing "PRINT
CHR$(4);..."  However, I, too, have a listing somehwere which will
make ctrl chars come up in inverse.  It's also built into double-take.
And possibly GPLE, although I'm not sure about that.


 -=> Jonathan I. Kamens | "There is no expedient to which man will not go
     MIT '91            |  to avoid the real labor of thought."
     jik@ATHENA.MIT.EDU |                          -- Thomas Alva Edison

dr@ski.UUCP (David Robins) (01/08/88)

In article <> SEWALL@UCONNVM.BITNET writes:
>
> TMPLee@DOCKMASTER.arpa writes...
>>Does anyone know if there is any way in basic (applesoft) under ProDos
>>to get the D$ (chr$(4) or chr$(132)) character written out to a file?  I
>>don't have a ProDos basic manual so don't know if there is any trick:
>>neither doubling it nor following it with a carriage return, either of
>>which seems a reasonable escape sequence, works.  .
>
>I've never tried to do that, what happens if you enclose ^D in quotes?
>as in:
>
>100 PRINT "^D"  where the ^D is typed from the keyboard (somewhere I've
>    got a routine that'll make the ^D appear as an inverse D in response
>    to the LIST command.

In both DOS 3.3 and ProDOS, inserting a "^D" in a PRINT statement, as
above, will be interpreted as a ^D, and with stop writing to the file.
Any PRINT statement following the goes to the screen rather than to
the file.  That is, both interpreters look for the ^D character, and
take it to be a command intended for them.

As I posted yesterday, I think you have to use a dummy character, and
then go back with a sector editor and replace that character with a
control-D.
-- 
					-dave

====================================================================
David Robins, M.D.  (ophthalmologist / electronics engineer)
Smith-Kettlewell Eye Research Foundation
(previously known as: Smith-Kettlewell Institute of Visual Sciences)
2232 Webster St; San Francisco CA 94115
415/561-1705 (voice)
			{ihnp4,qantel,dual}!ptsfa!ski!dr

The opinions expressed herein do not reflect the opinion of the Institute!