Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:10 01 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 : CMM2 Unpaired Brackets Box Command-

Author Message
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 01:35pm 10 Feb 2022
Copy link to clipboard 
Print this post

Hi

A quick query.

I added a couple of Boxes (for Bar graphs) on a CMM2 program & they worked as expected.

I ran Jim's variable report in MM E V5 & it came up with a couple of unpaired brackets on the Boxes code.  

I removed the offending brackets & the Boxes behaved the same.
Just wondering why they worked with the extra brackets?.

The two lines below show the original with the extra bracket on the RGB  bits & the other line without them for one of the Boxes.

WN_01_Batt is a number between 10 & 15

BOX 282, 102, (WN_01_Batt - 10) * 24, 11, 1, RGB(180, 180, 180)), RGB(180, 180, 180))
BOX 282, 102, (WN_01_Batt - 10) * 24, 11, 1, RGB(180, 180, 180), RGB(180, 180, 180)


Thanks

Brian
ChopperP
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 02:37pm 10 Feb 2022
Copy link to clipboard 
Print this post

MMBasic uses ad hoc parsing rather than an explicitly grammar-driven tool.

So long as it is "good enough" do you care...

John
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:41pm 10 Feb 2022
Copy link to clipboard 
Print this post

An extra closing bracket doesn't seem to cause grief.
An extra opening bracket will not be so forgiving.

MMEdit just counts them all and expects an equal count for opening and closing.

Jim
VK7JH
MMedit
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 02:09am 11 Feb 2022
Copy link to clipboard 
Print this post

Thanks John & Jim
ChopperP
 
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