[Coco] PRINT vs PRINT USING

James C. Hrubik jimhrubik at earthlink.net
Tue Mar 31 17:44:54 EDT 2020


According to page 268 of the Basic09 Tour Guide, there is no comma after the path number :  PRINT[#<expr>] USING <str expr>, <output list>

On Mar 31, 2020, at 5:14 PM, coco at jechar.ca wrote:

> On 2020-03-31 16:14, Bill Gunshannon wrote:
>> On 3/31/20 3:56 PM, coco at jechar.ca wrote:
>>>  If I want to print "HELLO" to the screen in a basic09 program
>>>  I would use.
>>>  PRINT "HELLO"
>>>  If instead I to print "HELLO" to a file I can use.
>>>  PRINT #pathno,"HELLO"
>>>  Is there any way to send the output of "PRINT USING" to
>>>  a file?
>>>  Charlie
>> According to the manual it is simply:
>> PRINT #<int exp>, USING <str expr>, <output list>
>> bill
> 
> When I try the syntax you suggest I get a compile error.
> 
> 
>   OPEN #pathno,saveat$:WRITE
> 
>   PRINT #pathno,"TEST"
> 
>   FOR y=1 TO 19
>       FOR x=1 TO 21
>           PRINT #pathno," ";
>           PRINT #pathno, USING "H", quilt(x,y);
>       NEXT x
>       PRINT #pathno
> 
>   NEXT y
> 
>   CLOSE #pathno
> 
>   Everything worked before I tryed to send it to a file.
>   Also It works if except for the "PRINT USING" line.
>   So it is not an issue with the pathno or saveat$ varibles.
> 
>   Which are of type BYTE and STRING.
> 
>   PS THE COMPILE  ERROR POINTER POINTS TO JUST BEFORE "USING"
> 
>   Charlie.
> 
> 

———
The Angel of Death passed by me today, 
but I am confident that if he really needs me, 
he can find me faster than 9-1-1.
———
Sayings of Grandpa Jim, c. 2020





More information about the Coco mailing list