Hi,

You're checking if a structure isnot nothing, which is an error.

MS' VB compiler shows this:

error BC31419: 'IsNot' requires operands that have reference types, but this
operand has the value type (...)

Rolf

> -----Original Message-----
> From: [email protected] [mailto:mono-vb-
> [email protected]] On Behalf Of Easy_Rider9999
> Sent: sábado, 14 de noviembre de 2009 21:43
> To: [email protected]
> Subject: [mono-vb] if Iter isnot nothing then generates exception
> during compile!
> 
> 
> I get the following compile Error:
> 
> /home/jhmgbl/Projects/prjLinuxInfo/prjLinuxInfo/frmMain.vb (166,32) :
> Error
> VBNC99999: There was an exception during code generation.
> 
> /home/jhmgbl/Projects/prjLinuxInfo/prjLinuxInfo/<MyGenerator> (1,1) :
> Error
> VBNC99999: Unexpected error: There has been an internal error in the
> compiler caused by the line: (166,32)
> 
>   at vbnc.Is_IsNotExpression.GenerateCodeInternal (vbnc.EmitInfo Info)
> [0x0001e] in
> /media/disk/Downloads/Linux/mono-basic-
> 2.4.2/vbnc/vbnc/source/Expressions/BinaryExpressions/Is_IsNotExpression
> .vb:56
>   at vbnc.Expression.GenerateCode (vbnc.EmitInfo Info) [0x000dd] in
> /media/disk/Downloads/Linux/mono-basic-
> 2.4.2/vbnc/vbnc/source/Expressions/Expression.vb:195
> 
> Compilation took 00:00:02.8174030
> 
> 
> The Code of this procedure is:
> 
> Private Sub xvinfo
>                       Dim rIter as TreeIter = rootIter
>                       Dim Iter, lastRIter as TreeIter
>                       Dim si as new System.Diagnostics.ProcessStartInfo
>                       si.CreateNoWindow = true
>                       si.UseShellExecute = false
>                       si.RedirectStandardOutput = true
>                       si.FileName = "xvinfo"
>                       Dim p as process =
> system.diagnostics.process.start(si)
>                       Dim s as IO.StreamReader = p.StandardOutput
>                       Dim l as String
>                       Dim lastSpaces as Integer
>                       p.start
>                       Do
>                               l = s.ReadLine
>                               if l is nothing then exit Do
>                               Dim spaces as Integer = 0
>                               For I as Integer = 2 to 50 Step 2
>                                       if l.startsWith (New String(" "c,I))
then
>                                               spaces = I
>                                       else
>                                               exit For
>                                       end if
>                               next I
>                               Dim Diff as Integer = spaces - lastspaces
>                               if Diff = 2 then
>                                       lastSpaces = spaces
>                                       if Iter isnot nothing then
>                                               lastRIter = RIter
>                                               rIter = Iter
>                                       end if
> 
>                               elseif Diff = -2 then
>                                       rIter =
> Store.Getiter(riter,Store.GetPath(riter).up)
>                                       if rIter is nothing then rIter =
Iter
>                               end if
>                               iter = store.AppendValues(RIter,l)
> 
>                       Loop
>                       p.waitforexit
> 
> 
>               End Sub
> 
> 
> Regard Hans
> --
> View this message in context: http://old.nabble.com/if-Iter-isnot-
> nothing-then---generates-exception-during-compile%21-
> tp26353710p26353710.html
> Sent from the Mono - VB mailing list archive at Nabble.com.
> 
> _______________________________________________
> Mono-vb mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-vb

_______________________________________________
Mono-vb mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-vb

Reply via email to