Subj : Something strange going o To : Shaun Bebbington From : Ed Vance Date : Wed Apr 11 2018 22:37:00 04-11-18 03:33 Shaun Bebbington wrote to All about Something strange going o Howdy! Shaun, SB> @MSGID: <5ACE2329.2490.cbm@capitolcityonline.net> SB> Hi, SB> I found something odd today in the powerful CBM BASIC v2.0. SB> Having worked with Sinclair BASIC quite a lot recently, I use GOTO X SB> where X is a valid line number (i.e., LET X = 100). But I know that's SB> not possible with Microsoft BASIC. Of course there is the ON X GO TO SB> 100,200 ... SB> So I thought "I know, I'll try and use a function, could CBM BASIC use SB> this as a look up table". The following, I expected to go to the value SB> in the function A() which returns 10, but... SB> 0 DEF FN A(X) = 10 SB> 1 PRINT FN A(0) SB> 2 GO TO FN A(0) SB> 3 PRINT "END GRACEFULLY" SB> 4 END SB> 10 PRINT "STOP" SB> 11 STOP SB> Try it for yourself. What's going on here? SB> Thanks in advance. X isn't given a VALUE yet. I "think" (TM). .... Have you checked your smoke detector batteries & Fire Ext, LATELY?! --- MultiMail/MS-DOS v0.49 * Origin: CCO BBS - capitolcityonline.net:26 (1:2320/105) .