March 28, 2024, 02:22:14 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Compiler overflow

Started by Andy, September 13, 2020, 03:20:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

I have just added a few more controls into my program including "CoorCheck".

All is well except when I add in

CASE CoorCheck (it's a check box) I get this compile error:

Compiling Resources...
No Errors

Compiling...
xeditor46 v2.iwb
File: c:\test\xeditor\bin\xeditor46 v2.iwb (4143) Error: Internal compiler overflow C0003
Error(s) in compiling "c:\test\xeditor\bin\xeditor46 v2.iwb"
Build Failed

Any ideas anyone?

Thanks,
Andy.

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

send me a copy of this version and I'll look at it
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Thanks,

I've sent you the files, maybe it's a problem in the handler of the main window?

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

September 14, 2020, 04:31:58 AM #3 Last Edit: September 14, 2020, 04:48:16 AM by Andy
Just out of interest, I've counted up the number of controls.

There are 149 in total - if that helps.

And I tried adding a checkbox to another window (w6) and added a CASE statement for it.

The program compiled normally and ran...
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Your problem is too many CASE statements in one SELECT block. The limit is 100.
You need to break that big control block in 1/2
From this:
CASE @IDCONTROL
   SELECT @CONTROLID
      case 1
      ...
      case 149
   ENDSELECT
to this:
CASE @IDCONTROL
   SELECT @CONTROLID
      case 1
      ...
      case 75
   ENDSELECT
   SELECT @CONTROLID
      case 76
      ...
      case 149
   ENDSELECT
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Thanks Larry!

Well you learn something new every day, I was concerned over the number of controls I had used but was sure it was still a way of the 255 maximum.

Didn't know the maximum for cases in a select block was 100.

Tried it out, and yes that fixed it - thanks again.

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

aurelCB

oh that is a old limitation derived from C/C++

Andy

Aurel,

I seem to remember being told that once so so so long ago.... it's only now Larry and you have said it that I remember being told about it.

But I was only ever told about it once in the middle of having to learn lots of other things at the time.
 
Thanks.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

aurelCB

yes that was long tome ago when i was working on Aurel Basic heh...