Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:14 02 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 : Stand-alone MMBasic variable reporter

     Page 2 of 3    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:31pm 25 Jan 2019
Copy link to clipboard 
Print this post

STATIC appeared in V5.4.9 and MMEdit hasn't caught up yet.
I am working on it. (slowly)

Jim
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 04:59am 26 Jan 2019
Copy link to clipboard 
Print this post

Yet another update.
I realised that any use of the Library would cause any library functions to get listed as undefined.
Now you can scan your library source and add the functions (and constants etc) to MMEdit Plus and subsequent scans will check the library list, labeling them as "Lib" when found in the source.
The library list is remembered between sessions.
If you don't use the library, this option can be ignored.

I have also found more speed improvements.
2019-01-26_145756_MMEditPlus.zip

Jim

VK7JH
MMedit
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 11:02am 26 Jan 2019
Copy link to clipboard 
Print this post

  TassyJim said   STATIC appeared in V5.4.9 and MMEdit hasn't caught up yet.
I am working on it. (slowly) Jim

No problem - it turned up in a program I'm playing with and I thought I'd mention it in case it was missed.
Greg
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:34am 28 Jan 2019
Copy link to clipboard 
Print this post

False alarm. The updated version has a bug.


JimEdited by TassyJim 2019-01-29
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:39pm 28 Jan 2019
Copy link to clipboard 
Print this post

Try again - the bug has been squashed.
I have made another big improvement in processing time.
My test BAS file went from 466mS down to 190mS
C:\Users\Jim\Documents\apps\maximite\Boat_Computer_BASIC_Program\BoatComputerV4.bas
Time taken 187mS
Lines of code: 1162, Total variables: 250

Functions: 6
CFunctions: 0
Csubs: 1
Subroutines: 21
Fonts: 0
Total: 28

I was scanning through an array looking for existing variable names. This was slow so I tried keeping a long string with the new variable names getting added as they are found. It is much quicker to do an INSTR to find existing strings than step through an array. By padding the names to fixed length, it can also return the index to the array without any extra work. You just need to be able to handle long strings.

That was the most impressive speed improvement. The others involved changing IF...ENDIF..IF...ENDIFs to IF...ELSEIF...ELSE...ENDIF etc to reduce redundant code sections.

I now also check for "CM" etc in TEXT alignment and don't report it as a variable.
2019-01-29_063445_MMEditPlus.zip

Jim



VK7JH
MMedit
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 09:58pm 28 Jan 2019
Copy link to clipboard 
Print this post

Very Impressive, time to process down from around 5 seconds to just 0.75 seconds.

[code]
Time taken 751mS
Lines of code: 3904, Total variables: 500

Functions: 5
CFunctions: 0
Csubs: 0
Subroutines: 34
Fonts: 0
Total: 39
[/code]

Mike.Edited by KeepIS 2019-01-30
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 04:22am 31 Jan 2019
Copy link to clipboard 
Print this post

No speed improvement this time.
I have added checks for unpaired brackets and quotes. If you are using MMEdit or Notepad++, unpaired quotes stand out but brackets can hide.



I have also added 'crunch'
The variable report is still created immediately and then you can 'crunch'
This works the same as the crunch in MMEdit. Comments and blank lines are removed.
You can then 'copy' the crunch output into the clipboard, with optional AUTOSAVE and ctrl-Z added. (It also caters for Maximite and Picromite formats)

Once the crunched (or uncrunched) code in in the clipboard. A right click in TeraTerm or GFXterm will allow you to upload the code with not too much difficulty. You do have to issue your own NEW command first!
In MMEdit, the ending ctrl_Z gets suppressed when 'pasting'. That will get fixed in the next update.
2019-01-31_141722_MMEditPlus.zip

I might have a play with shortening the variable names next. Not something I like but when space is at a premium, needs must.

Jim

VK7JH
MMedit
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 09:39am 31 Jan 2019
Copy link to clipboard 
Print this post

I am pretty sure the RPi now uses AUTOSAVE , the same as the Micromites. It was changed from AUTO in one of the releases.

The option to drag the selected contents of an open MMEdit file into the interface does not seem to be available anymore.Is this by design?

regards
Gerry
Latest F4 Latest H7 FotS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:43pm 31 Jan 2019
Copy link to clipboard 
Print this post

  disco4now said   I am pretty sure the RPi now uses AUTOSAVE , the same as the Micromites. It was changed from AUTO in one of the releases.

I missed that. I will have to update my RPi and check. I assume that ctrl-Z is still a big no-no.
Thanks.

  disco4now said  
The option to drag the selected contents of an open MMEdit file into the interface does not seem to be available anymore.Is this by design?

regards
Gerry


I found the need to drop files in one place and text in the other place annoying and couldn't find a way to drop either into the text area so I gave up on dropping 'text'

If you were finding it useful, I can easily put it back again.

Jim

Edit: I have found out how to allow both files and text dropped onto the text window.
I will do some more checking but it seems to be OK.
Edited by TassyJim 2019-02-02
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:30pm 31 Jan 2019
Copy link to clipboard 
Print this post

RPi AUTOSAVE fixed - I knew about that back in November!

You can drop 'test' into the text window again (as well as files)
It seems to work as expected.
2019-02-01_063012_MMEditPlus.zip

Jim
VK7JH
MMedit
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 10:31pm 31 Jan 2019
Copy link to clipboard 
Print this post

Thanks. Seems good now.

Regards
Gerry
Latest F4 Latest H7 FotS
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 07:30am 01 Feb 2019
Copy link to clipboard 
Print this post

@TasssyJim

Speaking of MMEdit itself, what is the latest version? Website says 3.7.3, April 2018.
I have V3.7.5 OS Ver 10 build date 10 Nov 2018. I think that as the latest *tkn file I downloaded from TBS post.

Thanks

Brian


ChopperP
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 01:29am 02 Feb 2019
Copy link to clipboard 
Print this post

  Chopperp said   @TasssyJim

Speaking of MMEdit itself, what is the latest version? Website says 3.7.3, April 2018.
I have V3.7.5 OS Ver 10 build date 10 Nov 2018. I think that as the latest *tkn file I downloaded from TBS post.

Thanks

Brian


Website now says V3.8.1 8th Jan 2019

Jim
VK7JH
MMedit
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 08:27am 02 Feb 2019
Copy link to clipboard 
Print this post

Thanks Jim
ChopperP
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 06:33am 03 Feb 2019
Copy link to clipboard 
Print this post

Still playing.
A few bug fixes and a bit of cleaning up.
2019-02-03_163334_MMEditPlus.zip

Jim
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 06:42am 06 Feb 2019
Copy link to clipboard 
Print this post

One thing that annoyed me was the need to 'save' before running MMEditPlus from Notepad++

I have created a plugin that uses the clipboard to copy the current active file into MMEditPlus without the need to save. This saves overwriting a god copy of your program until you are happy with the outcome.

Since I went that far, I added a 'Format' option to set the indents of your code using the same rules that MMEdit uses (more or less)



You will need to update MMEditPlus as well as installing the plugin.
The old method using 'run' still works the same.

2019-02-06_163452_nppMMplugin.zip
Edit the inf file to include the path to your MMEditPlus.exe
Place the dll and inf files into a folder named nppMM inside the plugins folder.
It is difficult to edit the inf file once it's placed in the Program Files folders!
My dll is at:
"C:\Program Files (x86)\Notepad++\plugins\nppMM\nppMM.dll"
  Quote  
Exe Path = C:\Program Files (x86)\CCom\MMedit\MMEditPlus.exe
VR Shortcut = alt 121
Format Shortcut = alt 122
Indent = 1
Tab size = 2

For the two shortcuts, choices are alt, ctrl or shft and they do as expected.
The number represents the ascii value of the key eg 65 for 'A'
Function keys start at 112 for F1
The above inf file have alt_F10 and alt_F11

Indent of 1 causes all normal lines to start 1 tab-stop in.
FUNCTION etc starts full left.

Tab stop sets the number of spaces used for an indent.

2019-02-06_163757_MMEditPlus.zip

I don't think I have broken anything but take care, the 'format' alters you code. (Undo seems to work)

I have tested it on notepad++ V 7.6.3 (32bit).

JimEdited by TassyJim 2019-02-07
VK7JH
MMedit
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 08:42am 06 Feb 2019
Copy link to clipboard 
Print this post

Now all I need is a 64 bit version plugin

Mike.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:57pm 06 Feb 2019
Copy link to clipboard 
Print this post

I will work on the 64bit version. There are a lot of problems getting the size of integers correct. I hope the n++ documents are kind to me.

Jim
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 02:09am 07 Feb 2019
Copy link to clipboard 
Print this post

2019-02-07_120712_nppMM64.zip

64 bit version.
It seems to work but I get nervous working with pointers so give it a try and see how you go.

Jim

VK7JH
MMedit
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 03:32am 07 Feb 2019
Copy link to clipboard 
Print this post

Thanks for putting in that effort

The formatting partly works and I think you mentioned that when you posted the 32bit version. BTW I really like the way the main MMedit program formats.

Selecting Variable Report from the Plugin or Alt+F10 does nothing, using the existing Run shortcut works fine.

Formatting appears to fails in the latter part of an editor file in NP++ as the file size increases.

Mike.

NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
     Page 2 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025