GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/JimMartinson/_Archive/CST1794/ |
Upload File : |
' SimpleCalc nomainwin gosub [setup.main.Window] OPEN "SimpleCalc" FOR Window AS #main print #main, "font ms_sans_serif 10" PRINT #main, "trapclose [quit]" print #main.textboxTerm1, "!setfocus"; WAIT [quit] CONFIRM "Are you sure that you want to quit?"; quit$ IF quit$ = "no" THEN WAIT CLOSE #main END [setup.main.Window] WindowWidth = 250 WindowHeight = 200 DrawWidth = WindowWidth-8 ' Need to subtract L & R border widths DrawHeight = WindowHeight-34 ' Need to subtract Title & B heights UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2) centerX = int((DrawWidth)/2) ' calc center x centerY = int((DrawHeight)/2) ' calc center y TextboxColor$ = "white" ComboboxColor$ = "white" comboboxOperand$(0)="+" comboboxOperand$(1)="-" comboboxOperand$(2)="*" comboboxOperand$(3)="/" textbox #main.textboxTerm1, centerX-80, centerY-50, 50, 24 combobox #main.comboboxOperand, comboboxOperand$(), [comboboxOperandClick], centerX-25, centerY-50, 50, 100 textbox #main.textboxTerm2, centerX+30, centerY-50, 50, 24 button #main.button1,"&Calc",[buttonCalcClick], UL, centerX-55, centerY, 50, 24 button #main.button2,"E&xit",[buttonExitClick], UL, centerX+5, centerY, 50, 24 statictext #main.statictext1, "Answer:", centerX-55, centerY+50, 55, 24 textbox #main.textboxAnswer, centerX, centerY+45, 60, 24 return [buttonCalcClick] print #main.textboxTerm1, "!contents? Term1$"; Term1 = val(Term1$) print #main.comboboxOperand, "selection? Operand$"; if (Operand$ = "") then print #main.comboboxOperand, "contents? Operand$" print #main.textboxTerm2, "!contents? Term2$"; Term2 = val(Term2$) select case Operand$ case "+" Answer = Term1+Term2 Answer$ = str$(Answer) case "-" Answer = Term1-Term2 Answer$ = str$(Answer) case "*" Answer = Term1*Term2 Answer$ = str$(Answer) case "/" if (Term2 <> 0) then Answer = Term1/Term2 Answer$ = str$(Answer) else Answer$ = "N/A" end if case else Answer$ = "NOP" end select print #main.textboxAnswer, Answer$ wait return [buttonExitClick] CLOSE #main END return [comboboxOperandClick] wait return