10 REM PC-BASIC test 
20 REM DEF FN syntax
30 OPEN "OUTPUT.TXT" FOR OUTPUT AS 1
40 ON ERROR GOTO 1000
100 DEF FNA
110 DEF FNB(X)
120 DEF FNC(X)=1
130 DEF FND(X,Y)=1
140 DEF FNE(X)=LPRINT
200 PRINT FNA+1
210 PRINT FNB+1
220 PRINT FNC+1
230 PRINT FND+1
240 PRINT FNE+1
300 PRINT FNA(1)+1
310 PRINT FNB(1)+1
320 PRINT FNC(1)+1
330 PRINT FND(1)+1
340 PRINT FNE(1)+1
400 PRINT FNA(1,1)+1
410 PRINT FNB(1,1)+1
420 PRINT FNC(1,1)+1
430 PRINT FND(1,1)+1
440 PRINT FNE(1,1)+1
999 END
1000 PRINT#1, ERR, ERL
1010 RESUME NEXT
