Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:42 03 Aug 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 : Micromite - MMedit My wishes for 2019

     Page 1 of 2    
Author Message
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 09:58am 04 Jan 2019
Copy link to clipboard 
Print this post

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 jobsEdited by goc30 2019-01-05
 
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 11:29am 04 Jan 2019
Copy link to clipboard 
Print this post

  goc30 said  is it possible to create a "structure" type declaration which would allow to have in the same table as string as integers, floats, etc.


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 Zealand
Posts: 2442
Posted: 11:55am 04 Jan 2019
Copy link to clipboard 
Print this post

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 :-)Edited by robert.rozee 2019-01-05
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 01:32pm 04 Jan 2019
Copy link to clipboard 
Print this post

  robert.rozee said   surely the same effect can be obtained by declaring multiple arrays?


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: Australia
Posts: 1642
Posted: 09:10pm 04 Jan 2019
Copy link to clipboard 
Print this post

Previously Geoff wrote:

  Quote  So, with any new feature I consider:
- Will a significant number of people use it?
- Can it be done using the current features of MMBasic?
- Does it fit with the "look and feel" of the BASIC language?
- Will it be really useful?


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 Zealand
Posts: 9610
Posted: 10:28pm 04 Jan 2019
Copy link to clipboard 
Print this post

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)

  This Guy said  This guy said this thing.



EDIT: Correct my spelling, and add the example above.Edited by Grogster 2019-01-06
Smoke makes things work. When the smoke gets out, it stops!
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1642
Posted: 10:42pm 04 Jan 2019
Copy link to clipboard 
Print this post

  Grogster said  Just put in whatever name you like in the quote tags.


Thanks Grogster, You learn something new every day.

Bill
Keep safe. Live long and prosper.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 10:54pm 04 Jan 2019
Copy link to clipboard 
Print this post

.....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.Edited by Grogster 2019-01-06
Smoke makes things work. When the smoke gets out, it stops!
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1642
Posted: 11:13pm 04 Jan 2019
Copy link to clipboard 
Print this post

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: France
Posts: 435
Posted: 11:36pm 04 Jan 2019
Copy link to clipboard 
Print this post

  Turbo46 said  
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?


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: France
Posts: 435
Posted: 11:57pm 04 Jan 2019
Copy link to clipboard 
Print this post

  robert.rozee said  

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.


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: Australia
Posts: 6283
Posted: 11:59pm 04 Jan 2019
Copy link to clipboard 
Print this post

  goc30 said  
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


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 States
Posts: 1427
Posted: 12:09am 05 Jan 2019
Copy link to clipboard 
Print this post

  Thus sayeth Grog said   Just put in whatever name you like in the quote tags.



Micromites and Maximites! - Beginning Maximite
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1642
Posted: 12:22am 05 Jan 2019
Copy link to clipboard 
Print this post

  goc30 said  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.


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: France
Posts: 435
Posted: 12:35am 05 Jan 2019
Copy link to clipboard 
Print this post

  Turbo46 said  
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


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. Edited by goc30 2019-01-06
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1642
Posted: 01:44am 05 Jan 2019
Copy link to clipboard 
Print this post

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: Australia
Posts: 3292
Posted: 12:42pm 06 Jan 2019
Copy link to clipboard 
Print this post

  goc30 said  is it possible to create a "structure" type declaration which would allow to have in the same table as string as integers, floats, etc.

Aaaggghhh. Sorry, not possible. This is an interpreter that is running in a single chip with restricted memory.

  goc30 said   all languages use declarations type "structure", from ASM to Python, passing by the "C", Pascal, php, etc ..

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?

GeoffEdited by Geoffg 2019-01-07
Geoff Graham - http://geoffg.net
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 01:41pm 06 Jan 2019
Copy link to clipboard 
Print this post

  Geoffg said  
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.

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.

  Geoffg said  
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

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 Kingdom
Posts: 2170
Posted: 01:44pm 06 Jan 2019
Copy link to clipboard 
Print this post

  Geoffg said  

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


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 Kingdom
Posts: 4044
Posted: 03:13pm 06 Jan 2019
Copy link to clipboard 
Print this post

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    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025