![]() |
Forum Index : Microcontroller and PC projects : Micromite - MMedit My wishes for 2019
Page 1 of 2 ![]() ![]() |
|||||
Author | Message | ||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
Hello everyone and all the wishes for the new year 2019 I open this topic so that everyone can put their wishes concerning the improvement requests for the micromite family and for mmedit I begin Micromite: is it possible to create a "structure" type declaration which would allow to have in the same table as string as integers, floats, etc. And in this case we can use var as struct typtb1 var1 as integer var2 as string etc... end struct dim table1(10) as typtb1 '--- in prog: table1(x).var1=1 table1(x).var2="hello" ... MMedit: You have a function that give all variables (report variables usage). It is very good, but could you add an "*" in front of the line number corresponding to the declaration of this variable. This allows to know all the undeclared variables Thank and "bravo" for yours jobs |
||||
Paul_L Guru ![]() Joined: 03/03/2016 Location: United StatesPosts: 769 |
It sounds like you're trying to define a database something like Vulcan where the structure of the variables contained in the file is defined in the file header. When you open the file the interpreter will automatically assign memory to contain copies of all the file variables. This results in having variables which persist after the program terminates and are automatically reloaded when the program opens the file and it results in the distinction between "MEMVARS" and real, outside of the program, persistant "FILEVARS". Sounds like a big job to me. Or, maybe you're just trying to define a non-persistant string containing a bunch of variables of different types concatenated together. A sort of concatenation like X$=str$(A!,3,1)+str$(B!,3,1)+str$(C%,2)+D$+E$. That should be do-able within MMbasic. Paul in NY |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
surely the same effect can be obtained by declaring multiple arrays? DIM INTEGER table.i(10) DIM STRING table.s(10) LENGTH 32 [ ... ] x=5 table.i(x)=1 table.s(x)="hello" i believe one of geoff's mantras is to try and avoid adding new features that can instead be accomplished using the existing language with relative ease. cheers, rob :-) |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
no, it's not same thing, with subroutines, you can use struct with only one declaration array with multiple arrays you must declare each array |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Previously Geoff wrote: I think that says it? While it does fit with the "look and feel of the (Visual) BASIC language I think it fails the other three. With the MMEdit one - if you use OPTION EXPLICIT you will soon find out which variables have not been declared or have been misspelt. I agree that it could be useful though. Maybe use bold as an indicator? Bill PS How do you replace the Quote: with So and so said: when you quote somebody? Keep safe. Live long and prosper. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Just put in whatever name you like in the quote tags. I will use parenthesis here, as the square-brackets would be interpreted by the forum as codes. (QUOTE=This Guy)This guy said this thing.(/QUOTE) EDIT: Correct my spelling, and add the example above. Smoke makes things work. When the smoke gets out, it stops! |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Thanks Grogster, You learn something new every day. Bill Keep safe. Live long and prosper. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
.....or you can just click the QUOTE button on the post you want to quote from(top right-hand side of the post), and the forum will copy and paste the post into your reply, complete with the correct tags, and you can just trim it to what you want. ![]() I tend to only manually edit the tag, if I am quoting someone from outside the forums, such as another website, forum, or a celebrity etc. Smoke makes things work. When the smoke gets out, it stops! |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Thanks again, I tested that in the 'Preview Post' window and that method quotes the whole post while the first method allows you to paste a selection in between the quote/end-quote markers. Bill Keep safe. Live long and prosper. |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
I use "Option explicit" for all of my progs but I have a lot of progs an i use a part of this progs for my news progs, and each time I have some vars not declared and some vars declared 2 or more times. And in interpreted language the declaration errors only come out if the program uses the variable in error, and in addition the program stops immediatly. You have to correct this error (one by one) and then reload the program, and if you have more than 300 blocks to load, that's a lot of time wasted. If I know what are bads vars, I can correct all and relaod my prog in 1 time. |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
all languages use declarations type "structure", from ASM to Python, passing by the "C", Pascal, php, etc .. And if these languages have the type "structure" that mean that it is useful and even certainly necessary. Think for exemple about using function "Text" with or without structure. It is not same, and more eficient than line too long and ultimately confusion and therefore error |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
What I want to do is differentiate between the same variable name in different SUB/FUNCTIONs. I will also need to look for DIM statements to do that so something like your request is likely. First, I have to redo the Syntax file system to try and catch up with the ever growing range of devices and MMBasic versions. Without a correct syntax file, looking for user variables is unreliable. Jim VK7JH MMedit |
||||
CircuitGizmos![]() Guru ![]() Joined: 08/09/2011 Location: United StatesPosts: 1427 |
![]() Micromites and Maximites! - Beginning Maximite |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
While I use MMEdit almost exclusively, in a situation as you describe, it might pay to use the internal editor for the first part of this process. At least you don't have to download the program after correcting each error. You can keep the MMEdit window open at the same time for reference. Maybe even correct the errors in MMEdit at the same time. Bill Keep safe. Live long and prosper. |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
I think that what I ask is not complicated to do, in any case less complicated than to be obliged to use 3 or 4 text editors, 2 or 3 download programs, not to mention also to lift the left leg when I run the program, and put a finger in the nose after every compilation error. I use MMedit because it is an IDE, and I don't want to pass many hours to change between Mmedit and others programms each time I run my prog an other point: when you use internal editor with serial console (via terraterm for exemple), you can't in same time using mmedit other than text editor. And I don't speak about bugs when you have an serial error in MmEdit (need to reboot PC). this ultim point explain why it is "dangerous" to use serial console via terraterm and run MmEdit in same time. |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
goc30, I don't think the sarcasm was necessary. I was suggesting an alternative to multiple downloads of your program. Only one editor is needed, the internal one, I use Tera Term to connect to the Micomite. F2 to run the program, the line with the error is listed, F4 to edit it, F2 to run again and so on. Easy. XMODEM SEND to get the file back into the PC. Bill Keep safe. Live long and prosper. |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Aaaggghhh. Sorry, not possible. This is an interpreter that is running in a single chip with restricted memory. Not correct. Change all to many and you would be closer to being correct. Also, don't forget that the languages that you list are compiled/run on much larger machines. For some reason we have lately been getting a lot of suggestions based on the C language. Are people moving from C to BASIC? Geoff Geoff Graham - http://geoffg.net |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
I don't undestand why Python is an interpreter and can use structured data link And if it is a memory problem, i Think that structured data is better and use less memory than 3 or 4 tables x dimensions. it makes sense: in the RPI world (I use C-python-pascal-qt5 and php), and in the arduino world there is many librairy in "C". |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
no. just cherry picking. If a move to C is required, that side is well served already. |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
Anyone know the size of a self-hosting (i.e. no OS) python environment on a uC (ARM or MIPS I suppose)? I've a feeling it will be bigger than MMBasic. John |
||||
Page 1 of 2 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |