Invalid Inline Instruction Error 88

Why the following happens:

while (true) int a; if(true) int a; if(true) int a = 5; if(true) int a = somestaticfunction(); 

apperently if fail with: "invalid embedded statement error 88" in the visual studio.

+4
source share
2 answers

Here is a good explanation of what is happening, it is part of the language specification. Objective-C, Java, and C seem to have the same limitations. You can get around this by concluding your statements like this.

 while(true) {int a;} if(true) {int a;} if(true) {int a = 5;} if(true) {int a = somestaticfunction();} 
+6
source

It is not possible to write this in C #. You must change it as below, otherwise it will generate CS1023: Compiler Error , which says:

A built-in statement, such as statements following an if, cannot contain either declarations or tagged statements.

  while (true) { int a; } if(true) { int a; } if(true) { int a = 5; } if (true) { int a = somestaticfunction(); } 
0
source

All Articles