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

Re: BASIC: File type mismatch??



In <9412022342591.DLITE.jefflv@delphi.com> jefflv@delphi.com (Jeff Vannest) writes:

>        HELP!!!! You all have been such a help in the past that I 
>almost hesitate to bother you again, BUT, here it goes....

>I'm trying to get text from the Apple][e to the IBM...
>Well, I got the output running over to the IBM o.k., but the basic
>program will not open up the file from the disk correctly. Here is the
>output from the session:

>]*--*  12-01-94  -  23:35:27  *--*
>cat               <------------catalog command by me

>/JOHN                                  

> NAME           TYPE  BLOCKS  MODIFIED 

> EVAGELISM       AWP      11  11-AUG-94
> SERMONS         AWP       3  16-NOV-93
> [few deleted...]
> THANKSGIVING.93 AWP      12  28-NOV-93
> SERMON.12.26.93 AWP       4  26-DEC-93
> PRIORITIES.IV   AWP      13  18-AUG-94
> 
>BLOCKS FREE:   23     BLOCKS USED:  257


>]
>]list                      <--------list command by me

> 105 F$ = "sermons"
> 110 D$ =  CHR$ (4)
> 120  PRINT D$"PR#1"
> 130  PRINT D$"OPEN ";F$
> 140  ONERR  GOTO 190
> 150  PRINT D$"read ";F$
> 160  GET ZZ$: PRINT ZZ$;: GOTO 160
> 190  PRINT D$"CLOSE"
> 200  POKE 216,0: PRINT D$"pr#0"

>]run                        <-------run command by me!


>FILE TYPE MISMATCH        <--error that I can't figure out!!!!

>BREAK IN 130
>]
>]

>Got any suggestions?

It's been a LONG time since I programmed in BASIC, but let's what I can
confuse ya with.  It looks like you're tying to print an AWP (AppleWorks
Word Processor) file from Basic, just by reading each line and dumping
that line to the printer.  Well, I think you'll to use AppleWorks and
save (Print) those files as ASCII (Text) Files before you use your program,
then you should have any trouble.  And use the option of Carriage Return
After Each Line.

AppleWorks saves more than just text in it's files - it has things like
Bold begin/end, Underline begin/end, etc. Not to mention the "ruler" settings.