W3C home > Mailing lists > Public > www-amaya-dev@w3.org > June 2007

Notice about Fatal Error in 'AmayaMathMLPanel :: OnButton' function

From: 石井裕介 <yusuke@sw.it.aoyama.ac.jp>
Date: Wed, 20 Jun 2007 18:54:40 +0900
Message-ID: <001401c7b321$054c2f00$33d20285@FMBEF8EE488345>
To: <www-amaya-dev@w3.org>
I tried to compile Amaya.dsw on the System of Microsoft Visual C++ 6.0. but, 
an error occurred in MathMLPanel.cpp . I'll let you know the detail as 
follow.

The error's detail is

..\Amaya\thotlib\dialogue\MathMLPanel.cpp (345) : fatal error C1061 : 
restriction of compiler : The Level of nesting about block in the program 
exceeded the maximum

The rise of nesting level must be stopped somewhere, I think so.
I can guess the reason that there are too many 'else if' not to be in the 
permissible range. So, I suggest that All 'else if' should be changed to 
'if', or provide a tentative Int variable (for instance , name is 'flag'). 
The second option is as follow.

flag = 0;

if(...)
else if...
else if...
else if...
.....
else
    flag = 1;

if(flag == 1){ }

if(....)
else if...
....
else
    flag = 2;

if(flag ==2){ }
... same process repeats

 it means that firstly set the value of 'flag' as 0 and 'else if' treatment 
repeats at constant times (for instance, 100 times) ,and at the last , 
'flag' is set to be 1. Next, the value of 'flag' is checked and if it is 1, 
nothing happens and nesting level finishes and restarts as 'if' and 'else 
if' repeated at 100 times, Every time 'else if' reached to 100 times , flag 
++ and nesting level finishes.As the result, nesting level never exceed 
maximum.
Received on Wednesday, 20 June 2007 09:49:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:49:02 GMT