IonicWind Software

IWBasic => General Questions => Topic started by: Andy on September 13, 2020, 03:20:47 AM

Title: Compiler overflow
Post by: Andy on September 13, 2020, 03:20:47 AM
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.

Title: Re: Compiler overflow
Post by: LarryMc on September 13, 2020, 10:03:18 AM
send me a copy of this version and I'll look at it
Title: Re: Compiler overflow
Post by: Andy on September 13, 2020, 11:02:13 PM
Thanks,

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

Andy.
Title: Re: Compiler overflow
Post by: Andy on September 14, 2020, 04:31:58 AM
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...
Title: Re: Compiler overflow
Post by: LarryMc on September 14, 2020, 12:49:51 PM
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
Title: Re: Compiler overflow
Post by: Andy on September 14, 2020, 10:09:20 PM
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.
Title: Re: Compiler overflow
Post by: aurelCB on September 15, 2020, 01:37:17 PM
oh that is a old limitation derived from C/C++
Title: Re: Compiler overflow
Post by: Andy on September 16, 2020, 06:28:28 AM
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.
Title: Re: Compiler overflow
Post by: aurelCB on September 17, 2020, 01:45:13 PM
yes that was long tome ago when i was working on Aurel Basic heh...