simple calculator using operator control array. place one label name called lbldisplay,place 11 lab
simple calculator using operator control array. place one label name called lbldisplay,place 11 labels using array give the name for that
API Declarations
dim n1 as currency,n2 as currency
dim op as string
dim newnumber
dim memory as currency
Rate simple calculator using operator control array. place one label name called lbldisplay,place 11 lab
(1(1 Vote))
if newnumber then
lbldisplay=""
newnumber=false
end if
lbldisplay=lbldisplay & lbldigit(index)
end sub
sub lbloperator_click(index as integer)
if op=""then
n1=lbldisplay
else
n2=lbldisplay
select case op
case "+"
lbldisplay=n1+n2
case "-
lbldisplay=n1-n2
case "*"
lbldisplay=n1*n2
case "/"
lbldisplay=n1/n2
end select
op=""
end if
if index>0 then
op=lbloperator(index)
end if
newnumber=true
end sub
subform_load()
newnumber=false
end sub
sub cmdclean_click()
lbldisplay=""
end sub
sub cmdMem_click()
memory=lbldisplay
end sub
sub cmdRecall_click()
lbldispaly=memory
end sub
sub cmdoff_click()
end
end sub
simple calculator using operator control array. place one label name called lbldisplay,place 11 lab Comments
No comments yet — be the first to post one!
Post a Comment