|
Forum Index : Microcontroller and PC projects : Format error
| Author | Message | ||||
| Chrisk Senior Member Joined: 21/12/2014 Location: AustraliaPosts: 137 |
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 KingdomPosts: 4147 |
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: AustraliaPosts: 1116 |
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: AustraliaPosts: 3308 |
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: AustraliaPosts: 137 |
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. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |