Bug Tracking


Author Message
epsilon

Senior Member

Joined: 30/07/2020
Location: Belgium
Posts: 184
Posted: 03:00pm 08 Mar 2021      

  Geoffg said  - A problem in MMBasic recursive FOR loops (this may not be fixable)


I actually can't get WHILE loops to work with recursive functions and use FOR loops as a workaround:


SUB recurseLoop(n%)
 IF n%=0 THEN
   EXIT SUB
 ENDIF

 LOCAL ii%=0

 'DO WHILE ii%<4 <-- This results in LOOP without a matching DO error.
 FOR ii%= 0 TO 3
   PRINT "*";
   recurseLoop n%-1
 '  INC ii%
 NEXT ii% 'LOOP
END SUB

recurseLoop 3

END


Regarding your experience with free cloud software, I once had an IOT project fall through, after launch, because the provider (Particle at the time), simply removed from they cloud API a key feature I relied on without notice. There was no workaround. I would have had to set up (and pay for) a bunch of cloud infrastructure myself to keep the project going.