JustBasic,在代码中出现“错误的嵌套错误选择/案例”

问题描述

编程新手,很抱歉,如果是基本问题,第一次做模块化工作。不知道我在这里做错了什么,但是第 41 行([ShowBalance] --> Case"C" 在我尝试运行我的程序时吐出标题中的错误。什么嵌套不正确?

Balance=1000
Print "Banking Menu"
Do
Gosub[Menu]
Gosub[Deposit]
Gosub[Withdrawal]
Gosub[ShowBalance]
Loop Until Choice$="Q"
Print "Thanks for using the Banking Application"
End

[Menu]
Print "A. Deposit"
  Print "B. Withdrawal"
  Print "C. Show Balance"
  Print "Q. Quit"
  Input "Make Selection: ";Choice$
  Select Case Upper$(Choice$)
Return

[Deposit]
Case "A"
      Input "Enter Amount to Deposit: ";Dep
      If Dep > 0 Then
        Balance=Balance+Dep
      Else
        Print "Invalid Amount"
      End If
Return

[Withdrawal]
Case "B"
        Input "Enter Amount to Withdraw: ";Wdrw
        If Wdrw <= 1000 Then
            Balance=Balance-Wdrw
        Else
            Print "Invalid Amount"
Return

[ShowBalance]
Case "C"
      Print
      Print "*********************************"
      Print "*** Account Balance: $";using("####.##",Balance);" ***"
      Print "*********************************"
  End Select
  Print
  Print "----------------------------"
Return

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)