B4R Question Select / Case in B4R

Hypnos

Active Member
Licensed User
Longtime User
Anyone know B4R how to handle "Select / Case" ?

I have few b4r application using "select /case" but the application very easy to have problem and will restart if I have many "case" usage (e.g. more than 10). It don't have issue if I deleted some of the "case" or change it to "if/then"

Any idea? Thanks!
 

thetahsk

Active Member
Licensed User
Longtime User
Anyone know B4R how to handle "Select / Case" ?

I have few b4r application using "select /case" but the application very easy to have problem and will restart if I have many "case" usage (e.g. more than 10). It don't have issue if I deleted some of the "case" or change it to "if/then"

Any idea? Thanks!

Post your code
 
Upvote 0

RJB

Active Member
Licensed User
Longtime User
This looks like the same problem I've had. I spent two days stripping the code down to almost nothing to prove it as the failure occurred in a completely different area.
I've now replaced one of the 'select cases' with 'if thens' and it works. This leaves ten select cases so the problem looks like something in compilation.

Whilst looking for the problem I put a lot on 'availableRAM' checks in the code and noticed that the figure increased from 136 to 4294967257 at about the same time as the failure, though again in a different part of the code. That's clearly not feasible on a Uno!! But I don't know if it's related to this problem of something else I need to look for.

Anyone have any suggestions re. the select/ case problem? (or memory figure for that matter)
 
Upvote 0

MathiasM

Active Member
Licensed User
Can you post a minimal example that demonstrates your problem? It helps a lot in identifying and solving the problem.
 
Upvote 0
Top