|
Forum Index : Microcontroller and PC projects : Musings about Predefined Read Only Variable - MM.xxx
| Author | Message | ||||
| vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1196 |
As the various *Mite firmwares grow and expand, new PROVs (Predefined Read Only Variables) sometimes appear. Some are of the form MM.VERS, for example, and others are of the form MM.INFO(LCD320), again, for example. The issue I see is software meant for newer firmware running on older firmware, or mismatched hardware. The function style of PROV, MM.INFO(???), returns an error for unrecognized variables, which can be handled by a running program, using our dear friend ONERR. But the simple PROV type returns a valid value no matter what. For example, Print MM.GOT16MEG gives 0, even though the request is meaningless. Could MM. be defined as a reserved word, and any undefined MM.<arg> would return a specific value that is recognized as invalid? I don't know what value is a good indicator of invalid, but it ought to be stored in MM.INVALID, or possibly even MM.NAN (Not A Number.) Yes, I know the manual has the example If MM.VER < 6.0002 Then Error "Needs version 6.00.02 or greater" but that only covers version issues.It might be neat too if there were a way to list available PROVs, much like List Commands, List Functions or Option List, especially if these lists could be captured by a running program. Edited 2026-11-18 02:49 by vegipete Visit Vegipete's *Mite Library for cool programs. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |