[Coco] DEFFN in Extended BASIC

Allen Huffman alsplace at pobox.com
Sun Jan 4 00:26:27 EST 2015


> On Jan 3, 2015, at 8:43 PM, Arthur Flexser <flexser at fiu.edu> wrote:
> 
> DEF FN can take only a single argument, contrary to what it says in some
> Tandy documentation.

Test program - does the same thing with and without DEFFN, and shows the time of each:

10 T1=TIMER
20 FOR X=0 TO 31:FOR Y=0 TO 15
30 P=1024+Y*32+X:POKE P,42
40 NEXT:NEXT
50 T1=TIMER-T1

60 DEF FNP(X Y)=1024+Y*32+X
70 T2=TIMER
80 FOR X=0 TO 31:FOR Y=0 TO 15
90 P=FNP(X Y):POKE P,43
100 NEXT:NEXT
110 T2=TIMER-T2

120 PRINT T1,T2

The 32 column screen will be covered with inverted asterisks, then inverted plus signs.

		— Allen



More information about the Coco mailing list