| Posted: 11:33am 04 Aug 2025 | 
          Copy link to clipboard  | 
          Print this post  | 
        
           
                                                      	 | 
       
      
     
       
      Hi everyone,
  I want to report a problem I've encountered while working with MMBasic on my device PicoCalc. It seems that opening a .bas file in the editor and then saving it—even without making any manual changes—modifies the file's content in a way that causes the program to break.
  The content of the testing file is: 
 
  OPTION EXPLICIT
  Const MAXF = 10 Dim files$(MAXF) Dim count Dim fname$, tmp$
  CHDIR "B:/" count = 0 fname$ = DIR$("*.*")
  Do While fname$ <> "" And count < MAXF   files$(count) = fname$   count = count + 1   fname$ = DIR$("") Loop
  For i = 0 To count - 1   Print i, files$(i) Next i
 
 
  After loading this program into memory, line 13 is automatically changed to:
 
  Option EXPLICIT
  Const MAXF = 10 Dim files$(MAXF) Dim count Dim fname$, tmp$
  Chdir "B:/" count = 0 fname$ = Dir$("*.*")
  Do While fname$ <> "" And count < MAXF   Files $(count) = fname$   count = count + 1   fname$ = Dir$("") Loop
  For i = 0 To count - 1   Print i, files$(i) Next i
 
 
  Note the added space between Files and $(count) — this causes a syntax error when running the program.
  Could someone confirm if this is a known issue with the MMBasic editor on PicoCalc or related platforms?
  Thanks, Tytus       |