>i4004.c:427:21: error: Too many cases
Is there a way to make a switch work within a switch?
switch within switch
Re: switch within switch
Sub functions?
Have you tried with an extra parenthesis enclosure?
Could you show a code snippet?
Have you tried with an extra parenthesis enclosure?
Could you show a code snippet?
Re: switch within switch
Sorry, I was far too tired last night so I didn't reply.
There's a limit of 256 case statements that can be pending - I'm not sure how you did it with an i4004 instruction set, but that's likely the problem. I can raise the limit, but in the mean time you can work around it by putting the second level switch statements into a separate function.
There's a limit of 256 case statements that can be pending - I'm not sure how you did it with an i4004 instruction set, but that's likely the problem. I can raise the limit, but in the mean time you can work around it by putting the second level switch statements into a separate function.
Re: switch within switch
I've got 256 cases alright. The secondary switches within the first one aren't so big (maybe 6-7 cases), so maybe pushing 256 up to 512 would cover things well if that isn't detrimental. I only need 256 in the "parent" switch.
Re: switch within switch
The nightly from today has a limit of 512 - hopefully that'll be enough!
Re: switch within switch
Is the nightly server down?
Re: switch within switch
Downloaded the latest nightly; it compiles great now. Thanks dom and stefano!