Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:34 21 Nov 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 : Format error

Author Message
Chrisk

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 137
Posted: 07:59am 18 Jan 2023
Copy link to clipboard 
Print this post

Hi Guys

Can someone explain why I am getting this error.
I have used a similar line before with no problems

LCD 2, 1, format$(Ssum,"%3g") + " " + Mid$(Time$,1,5)
Error: FORMAT is not declared

Chrisk
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4147
Posted: 08:23am 18 Jan 2023
Copy link to clipboard 
Print this post

In case it's a specific glitch in the parser, does it work in a line more like

a$=format$(...)

John
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1116
Posted: 08:24am 18 Jan 2023
Copy link to clipboard 
Print this post

Hi Chris,

What platform, what version of MMBasic and possibly a dump of OPTIONs?

Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 09:58am 18 Jan 2023
Copy link to clipboard 
Print this post

Obviously the function FORMAT is not included in the version of MMBasic that you are using (check the user manual for that specific version).

Because there is no such built in function MMBasic then went looking for a user defined function called "format" and because that was not found it generated an error message to that effect.

Instead of FORMAT() use STR().  It works differently but can generate a similar result.

Geoff
Geoff Graham - http://geoffg.net
 
Chrisk

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 137
Posted: 03:25am 19 Jan 2023
Copy link to clipboard 
Print this post

Thank you Guys for your replies

I have a CMM using an older version of MMBasic and what I forgot is that the MMBasic is different for my Micromite Explore64 using MMBasic Version 5.0501

Used the STR() instruction without a problem.

Thanks again.  
 
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