Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:14 01 Sep 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite MMBasic - Opening and saving file changes content

Author Message
tytus
Newbie

Joined: 04/08/2025
Location: Poland
Posts: 2
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
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10377
Posted: 11:36am 04 Aug 2025
Copy link to clipboard 
Print this post

FILES is a command and reserved word
 
tytus
Newbie

Joined: 04/08/2025
Location: Poland
Posts: 2
Posted: 11:44am 04 Aug 2025
Copy link to clipboard 
Print this post

Oh, now I understand. A lot of confusion over the simple use of a reserved word :)
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025