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

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

From: Martin Duerst <duerst@it.aoyama.ac.jp>
Date: Fri, 22 Jun 2007 17:48:55 +0900
Message-Id: <>
To: 石井裕介 <yusuke@sw.it.aoyama.ac.jp>, <www-amaya-dev@w3.org>

At 18:54 07/06/20, 石井裕介 wrote:
>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.

This needs a small fix.

>flag = 0;
>else if...
>else if...
>else if...
>    flag = 1;
>if(flag == 1){ }

delete this line:   if (....)
>else if...
>    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.   

It would probably also be worth investigating whether there are not
better ways of implementing what's done here, e.g. via tables or some

Regards,    Martin.

#-#-#  Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
#-#-#  http://www.sw.it.aoyama.ac.jp       mailto:duerst@it.aoyama.ac.jp     
Received on Friday, 22 June 2007 09:11:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:31:09 UTC