[mono-vb] vbnc console menu question

Jude DaShiell jdashiel at shellworld.net
Sun Apr 12 10:15:28 EDT 2009

Use menu subroutine in file menu.vb to show menu on screen then have tester.vb f
ile that wraps around menu.vb print out collected response from menu.vb.  I trie
d several things none of them successful but this last one was surprising.  I'm 
not using G.U.I. controls since they won't work in Linux command line environmen
t and generate exceptions.  Compiler is vbnc.

' File: tester.vb
Option Strict On
Imports System

Module Tester
Sub Main()
Dim Answer As String = MenuMethod()
MenuMethod( )
Console.WriteLine("Caught: " + Answer)
End Sub
End Module

' File: menu.vb
Module Menu
Sub MenuMethod()
' clear the console.
Console.WriteLine("iching Hexagram Generator - Program Menu")
Console.WriteLine("Read (a)bout program")
Console.WriteLine("randomly generate (c)omputer hexagram")
Console.WriteLine("enter (r)ecorded hexagram")
Console.WriteLine("(q)uit program")
Console.WriteLine("your choice (a/c/r/q): ")
Catch ex As Exception
End Try
End While
Return Menuvar
End Sub
End Module

File: typescript
Script started on Sun 12 Apr 2009 09:58:36 AM EDT
dashielljt at gmpexpress:~/iching6$ vbnc tester.vb menu.vb

** (/usr/lib/mono/2.0/vbnc.exe:2169): WARNING **: Symbol file /usr/lib/mono/2.0/vbnc.exe.mdb has incorrect version (expected 50.0, got 39)

** (/usr/lib/mono/2.0/vbnc.exe:2169): WARNING **: Symbol file /usr/lib/mono/gac/Microsoft.VisualBasic/ has incorrect version (expected 50.0, got 39)
Visual Basic.Net Compiler version (Mono 2.0 - r)
Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved.

/home/dashielljt/iching6/<MyGenerator> (1,1) : Error VBNC99999: Unexpected error: There has been an internal error in the compiler caused by the line: (6,36)
   at vbnc.Expression.ReclassifyToValueExpression () [0x00000]
   at vbnc.VariableInitializer.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
   at vbnc.VariableDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
   at vbnc.CodeBlock.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
   at vbnc.MethodBaseDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
   at vbnc.MethodDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
   at vbnc.SubDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
   at vbnc.Helper.ResolveCodeCollection (IEnumerable Collection, vbnc.ResolveInfo Info) [0x00000]
   at vbnc.BaseObjects`1[vbnc.IMember].ResolveCode (vbnc.ResolveInfo Info) [0x00000]
   at vbnc.TypeDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
   at vbnc.AssemblyDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
   at vbnc.Compiler.Compile_Resolve () [0x00000]
   at vbnc.Compiler.Compile () [0x00000] 
Compilation took 00:00:03.0704570
dashielljt at gmpexpress:~/iching6$ exit

Script done on Sun 12 Apr 2009 09:58:57 AM EDT

More information about the Mono-vb mailing list