nomainwin
WindowWidth = 880
WindowHeight = 650
groupbox #main.groupbox1, "Input", 6, 26, 840, 215
groupbox #main.groupbox2, "Results", 6, 246, 840, 265
statictext #main.statictext1, "Input 1", 30, 51, 96, 20
statictext #main.statictext2, "Input 2", 30, 81, 120, 20
statictext #main.statictext3, "Input 3", 30, 111, 144, 20
statictext #main.statictext4, "Input 4", 30, 141, 96, 20
statictext #main.statictext5, "Input 5", 30, 171, 184, 20
statictext #main.statictext6, "Input 6", 30, 201, 184, 20
textbox #main.textbox1, 246, 46, 100, 25
textbox #main.textbox2, 246, 76, 100, 25
textbox #main.textbox3, 246, 106, 100, 25
textbox #main.textbox4, 246, 136, 100, 25
textbox #main.textbox5, 246, 166, 100, 25
textbox #main.textbox6, 246, 196, 100, 25
statictext #main.statictext20, "Result 1", 94, 276, 112, 20
statictext #main.statictext21, "Result 2", 94, 301, 192, 20
statictext #main.statictext22, "Result 3", 94, 326, 176, 20
statictext #main.statictext23, "Result 4", 94, 351, 200, 20
statictext #main.statictext24, "Result 5", 94, 376, 208, 20
statictext #main.statictext25, "Result 6", 94, 401, 232, 20
statictext #main.statictext26, "Result 7", 94, 426, 136, 20
statictext #main.statictext27, "Result 8", 94, 451, 120, 20
statictext #main.statictext28, "Result 9", 94, 476, 120, 20
statictext #main.statictext40, "", 406, 276, 144, 20
statictext #main.statictext41, "", 406, 301, 144, 20
statictext #main.statictext42, "", 406, 326, 144, 20
statictext #main.statictext43, "", 406, 351, 144, 20
statictext #main.statictext44, "", 406, 376, 144, 20
statictext #main.statictext45, "", 406, 401, 144, 20
statictext #main.statictext46, "", 406, 426, 144, 20
statictext #main.statictext47, "", 406, 451, 144, 20
statictext #main.statictext48, "", 406, 476, 144, 20
open "test memory usage" for window_nf as #main
print #main, "trapclose [quit]"
print #main, "font ms_sans_serif 0 16"
timer 100, [main.inputLoop]
[main.inputLoop] 'wait here for input event
PRINT #main.textbox1, "!contents? Input1"
PRINT #main.textbox2, "!contents? Input2"
PRINT #main.textbox3, "!contents? Input3"
PRINT #main.textbox4, "!contents? Input4"
PRINT #main.textbox5, "!contents? Input5"
PRINT #main.textbox6, "!contents? Input6"
if Input5 <> 0 then
let value1=(Input2*Input6)/100
let value2=(Input2*Input3)/100
let value3=Input4
let value4=Input5-value2-value1-value3
let value5=(value4/Input2)*100
let value6=(value4/(100-Input2))*100
let value7=(Input5-Input4)/(Input6+Input3)*100
let value8=(Input1-Input5)
let value9=(100/value7)*100
end if
print #main.statictext40, "!font lucida_console 0 14 bold"
print #main.statictext41, "!font lucida_console 0 14 bold"
print #main.statictext42, "!font lucida_console 0 14 bold"
print #main.statictext43, "!font lucida_console 0 14 bold"
print #main.statictext44, "!font lucida_console 0 14 bold"
print #main.statictext45, "!font lucida_console 0 14 bold"
print #main.statictext46, "!font lucida_console 0 14 bold"
print #main.statictext47, "!font lucida_console 0 14 bold"
print #main.statictext48, "!font lucida_console 0 14 bold red"
mask$="#,###,###.##"
print #main.statictext40, using(mask$,value1)
print #main.statictext41, using(mask$,value2)
print #main.statictext42, using(mask$,value3)
print #main.statictext43, using(mask$,value4)
print #main.statictext44, using(mask$,value5)
print #main.statictext45, using(mask$,value6)
print #main.statictext46, using(mask$,value7)
print #main.statictext47, using(mask$,value8)
print #main.statictext48, using(mask$,value9)
wait
[quit]
Close #main
END
nomainwin
WindowWidth = 880
WindowHeight = 650
groupbox #main.groupbox1, "Input", 6, 26, 840, 215
groupbox #main.groupbox2, "Results", 6, 246, 840, 265
statictext #main.statictext1, "Input 1", 30, 51, 96, 20
statictext #main.statictext2, "Input 2", 30, 81, 120, 20
statictext #main.statictext3, "Input 3", 30, 111, 144, 20
statictext #main.statictext4, "Input 4", 30, 141, 96, 20
statictext #main.statictext5, "Input 5", 30, 171, 184, 20
statictext #main.statictext6, "Input 6", 30, 201, 184, 20
textbox #main.textbox1, 246, 46, 100, 25
textbox #main.textbox2, 246, 76, 100, 25
textbox #main.textbox3, 246, 106, 100, 25
textbox #main.textbox4, 246, 136, 100, 25
textbox #main.textbox5, 246, 166, 100, 25
textbox #main.textbox6, 246, 196, 100, 25
statictext #main.statictext20, "Result 1", 94, 276, 112, 20
statictext #main.statictext21, "Result 2", 94, 301, 192, 20
statictext #main.statictext22, "Result 3", 94, 326, 176, 20
statictext #main.statictext23, "Result 4", 94, 351, 200, 20
statictext #main.statictext24, "Result 5", 94, 376, 208, 20
statictext #main.statictext25, "Result 6", 94, 401, 232, 20
statictext #main.statictext26, "Result 7", 94, 426, 136, 20
statictext #main.statictext27, "Result 8", 94, 451, 120, 20
statictext #main.statictext28, "Result 9", 94, 476, 120, 20
statictext #main.statictext40, "", 406, 276, 144, 20
statictext #main.statictext41, "", 406, 301, 144, 20
statictext #main.statictext42, "", 406, 326, 144, 20
statictext #main.statictext43, "", 406, 351, 144, 20
statictext #main.statictext44, "", 406, 376, 144, 20
statictext #main.statictext45, "", 406, 401, 144, 20
statictext #main.statictext46, "", 406, 426, 144, 20
statictext #main.statictext47, "", 406, 451, 144, 20
statictext #main.statictext48, "", 406, 476, 144, 20
open "test memory usage" for window_nf as #main
print #main, "trapclose [quit]"
print #main, "font ms_sans_serif 0 16"
print #main.statictext40, "!font lucida_console 0 14 bold"
print #main.statictext41, "!font lucida_console 0 14 bold"
print #main.statictext42, "!font lucida_console 0 14 bold"
print #main.statictext43, "!font lucida_console 0 14 bold"
print #main.statictext44, "!font lucida_console 0 14 bold"
print #main.statictext45, "!font lucida_console 0 14 bold"
print #main.statictext46, "!font lucida_console 0 14 bold"
print #main.statictext47, "!font lucida_console 0 14 bold"
print #main.statictext48, "!font lucida_console 0 14 bold"
timer 100, [main.inputLoop]
[main.inputLoop] 'wait here for input event
PRINT #main.textbox1, "!contents? Input1"
PRINT #main.textbox2, "!contents? Input2"
PRINT #main.textbox3, "!contents? Input3"
PRINT #main.textbox4, "!contents? Input4"
PRINT #main.textbox5, "!contents? Input5"
PRINT #main.textbox6, "!contents? Input6"
if Input5 <> 0 then
let value1=(Input2*Input6)/100
let value2=(Input2*Input3)/100
let value3=Input4
let value4=Input5-value2-value1-value3
let value5=(value4/Input2)*100
let value6=(value4/(100-Input2))*100
let value7=(Input5-Input4)/(Input6+Input3)*100
let value8=(Input1-Input5)
let value9=(100/value7)*100
end if
mask$="#,###,###.##"
print #main.statictext40, using(mask$,value1)
print #main.statictext41, using(mask$,value2)
print #main.statictext42, using(mask$,value3)
print #main.statictext43, using(mask$,value4)
print #main.statictext44, using(mask$,value5)
print #main.statictext45, using(mask$,value6)
print #main.statictext46, using(mask$,value7)
print #main.statictext47, using(mask$,value8)
print #main.statictext48, using(mask$,value9)
wait
[quit]
Close #main
END