![]() |
Forum Index : Microcontroller and PC projects : feature request for library
Author | Message | ||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5091 |
Dear Geoff, I tried to use the library save command to add a set of defines (CONST x=y) type to MMBASIC. These become available in a program. But they are not available from the commandline (terminal)...only when running a program. Is there a way (or work around) making them available in the commandline also. This refers to my Arduino UNO project running MMbasic from an MX170. I would like the Arduino pins translated to MX170 pins. i.e. CONST D13 = 24 CONST A0 = 4 etc.... PicomiteVGA PETSCII ROBOTS |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
I don't THINK so. This is a 'Gotcha!' that I tripped on too, when I wanted to save a couple of strings and variables in the library. They are available as soon as you type RUN, but not before then. I guess that makes sense when you think about it, as code in the library is supposed to run before the main code at runtime, to setup specific things first, so I guess you have to initialise a run command to start that process in the first place. I think you want the variables etc to show up as soon as you power-up the MM, and if OPTION AUTORUN has not been enabled(set to ON), then this simply won't happen. I might be wrong, but I do remember having the exact same issue myself when I was playing with the library and was new to it. Smoke makes things work. When the smoke gets out, it stops! |
||||
MicroBlocks![]() Guru ![]() Joined: 12/05/2012 Location: ThailandPosts: 2209 |
You could add a line at the top with [code] END ' rest of the code (if there is any) [/code] You can then RUN it and get back into the prompt. All variables should then be available for use. If you already have some code type CONTINUE to continue after the END statement. Easy way to check your library functions. Microblocks. Build with logic. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Brilliant idea, MB. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |