Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:35 07 Jul 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 5.2 Firmware Update

     Page 2 of 2    
Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9590
Posted: 02:18am 04 Jul 2016
Copy link to clipboard 
Print this post

Okey dokey - I don't have the source. I will have a play and see if I can make the editor do the same thing here for me. I will post back if it does, along with examples. Strange.......
Smoke makes things work. When the smoke gets out, it stops!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 10:46pm 13 Jul 2016
Copy link to clipboard 
Print this post

Can someone please check this:

On a 64pinner with v5.2 (as on Geoff's website) I am getting something strange.

Trying to embed three For....Next loops as follows

FOR R = 0 TO 3
FOR G = 0 TO 3
FOR B = 0 TO 3
.......
NEXT B
NEXT G
NEXT R

But I get the following Error Message: FOR with misplaced = or TO

If I comment out the FOR R and NEXT R lines of code it is fine BUT I ultimately need the R loop too. i.e. as follows:
'FOR R = 0 TO 3
FOR G = 0 TO 3
FOR B = 0 TO 3
.......
NEXT B
NEXT G
'NEXT R


THEN if I add a fourth 'outer FOR NEXT loop (with the previous still commented out) but effectively have what I needed in the beginning, it all works fine! i.e.
FOR R = 0 TO 3
'FOR R = 0 TO 3
FOR G = 0 TO 3
FOR B = 0 TO 3
.......
NEXT B
NEXT G
'NEXT R
NEXT R


Is this a bug, or am I doing something silly??

By the way, it doesn't matter what variable name I use for the first For/Next Loop (i.e. 'R' above), or what value I go up to (i.e. 3 above).
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 10:52pm 13 Jul 2016
Copy link to clipboard 
Print this post

IGNORE LAST POST

I typed NEW and started again as the strange behaviour was getting more 'random'

Retyping from scratch fixed the issue. My only concern now is what caused it to go weird in the first place . . .
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9590
Posted: 10:57pm 13 Jul 2016
Copy link to clipboard 
Print this post

It's possible this is linked somehow to kiiid's posts about the MM+ becoming corrupted in some situations. I have not come across any corruption as of yet, but obscure bugs can be darn hard to squish!

What made me wonder was you posting about "strange behaviour was getting more 'random'", which is starting to sound like a hint of kiiid's problems.

How big is your code?
I wonder if your code and his are at a similar number of lines or something.
kiiid repored that it only seemed to happen for him, with large programs.
Smoke makes things work. When the smoke gets out, it stops!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 11:17pm 13 Jul 2016
Copy link to clipboard 
Print this post

Hi Grogs,

Small(ish) program on a MX470 - so not a 'size' issue.

It may have been a 'hidden' character within the editor as sometimes the editor exited with a couple of ASCII characters then appearing after the command prompt (when exiting the editor to go back to the command prompt).

This may have been caused by my clumsy fingers hitting an ALT key or something - but just not able to re-create the issue (at the moment anyway). However, nothing visible in the Editor in terms of 'strange' characters.

The other weird thing I have had over the last two days is the $ character changed into something totally 'pixellated' - exiting the Editor, and returning back in 'cleaned' it up. Got messed up when scrolling through a program listing, and once messed up, the character stayed the same (until as I say I exited the editor).

Will be 'stress testing' v5.2 over the coming days whilst developing something new . . .

WW

 
led-bloon

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 207
Posted: 03:35am 22 Jul 2016
Copy link to clipboard 
Print this post

Geoff (or matherp)
In the latest firmware v5.2, in cFunctions.h, there is reference to MAXVARLEN
& MAXDIM in the s_vartbl structure both of which are not defined.
Has anyone got the current values for these?
With thanks
don

Miss you George
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10218
Posted: 07:56am 22 Jul 2016
Copy link to clipboard 
Print this post

  Quote  Has anyone got the current values for these?


I've included the following taken from the MM firmware source into the top of CFunctions.h

#define MAXVARLEN 32 // maximum length of a variable name
#define MAXSTRLEN 255 // maximum length of a string
#define STRINGSIZE 256 // must be 1 more than MAXSTRLEN. 3 of these buffers are staticaly created
#define MAXDIM 8 // maximum nbr of dimensions to an array
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025