Code: Select all
10 DEF LOLSUM(X, Y)
20 X = X + Y
30 RETURN X
40 ENDPROC
50 PRINT "FUNCTION TEST"
60 A = 5
70 B = 5
80 PRINT "RESULT: "; LOLSUM(A,B)
90 END
Code: Select all
10 DEF LOLSUM(X, Y)
20 X = X + Y
30 RETURN X
40 ENDPROC
50 PRINT "FUNCTION TEST"
60 A = 5
70 B = 5
80 PRINT "RESULT: "; LOLSUM(A,B)
90 END
That doesn't look anything like BBC BASIC code, it's more similar to Microsoft BASIC or one of the others which are based on it.zachnoland wrote: ↑Sat 07 Dec 2024, 15:30 I tried the function in BASIC but the result I got was the error "No such variable", I don't know where I went wrong
I'm not familiar with that. The BBC BASIC tutorial is here.I have followed the tutorial on BBCMUG. this is my code:
Code: Select all
10 PRINT "FUNCTION TEST"
20 A = 5
30 B = 5
40 PRINT "RESULT: "; FNLOLSUM(A,B)
50 END
60 DEF FNLOLSUM(X, Y)
70 X = X + Y
80 = X
Thank you very muchRichard Russell wrote: ↑Sat 07 Dec 2024, 16:07Code: Select all
10 PRINT "FUNCTION TEST" 20 A = 5 30 B = 5 40 PRINT "RESULT: "; FNLOLSUM(A,B) 50 END 60 DEF FNLOLSUM(X, Y) 70 X = X + Y 80 = X
Btw BBCMUG is an abbreviation of (BBC Microcomputer System User Guide) the book was written by John Coll in 1984I'm not familiar with that. The BBC BASIC tutorial is here.
Ah, I've not seen that abbreviation for it used before. BBC BASIC has come a long way since then (everything documented about BASIC in that User Guide should still be valid, but there's a lot more now, mostly added with BBC BASIC V in 1986 or thereabouts).zachnoland wrote: ↑Sun 08 Dec 2024, 01:00 Btw BBCMUG is an abbreviation of (BBC Microcomputer System User Guide)