PDA

View Full Version : ph33r m7 l33t programming skillz


Pianomahnn
05-09-2001, 12:29 AM
Okay...I got lazy with that title, it's too hard typing with letters.

Anyways...I wrote a phatty program for my phatty TI-89 calculator.

As it is:

()
Prgm
ClrHome
ClrIO
Lbl top


Toolbar
Title "Program"
Item "VC Per Unit",vcpu
Item "Contr Margin", cmargin
Item "CM Per Unit", cmpunit
Item "CM Ratio", cmratio
Item "Break Even Sales", besales
Item "BE Per Unit", beunit
Item "BE Per Dollar", bepdol
Item "MarSafty $", mosd
Item "MarSafty Ratio", mosr
Item "Req Sales", rsales
Title "Quit"
Item "Yes", end

EndTBar

lbl vcpunit
ClrHome
ClrIO
getmode("ALL")»mode
setMode("Exact/Approx","Approximate")
setMode("Display Digits","float 12")
"x"»ctc
"x"»hl
"x"»vcpu
Dialog
Title "Variable Cost Per Unit"
Request "Change TC",ctc
Request "H-l Level",hl
EndDlog
expr(ctc)»ctc
expr(hl)»hl
expr(string(ctc/hl))»vcpu
Dialog
Title "The Answer Is"
Text "Variable cost per Unit:"&string(vcpu)
EndDlog
Goto Top

Lbl cmargin
lbl vcpunit
ClrHome
ClrIO
getmode("ALL")»mode
setMode("Exact/Approx","Approximate")
setMode("Display Digits","float 12")
"x"»sales
"x"»vc
"x"»cm
Dialog
Title "Contribution Margin"
Request "Sales",sales
Request "Var Costs", vc
EndDlog
expr(sales)»sales
expr(vc)»vc
expr(string(sales-vc))»cm
Dialog
Title "Contribution Margin"
Text "CM is:"&string(cm)
EndDlog
Goto Top

Lbl cmpunit
ClrHome
ClrIO
getmode("ALL")»mode
setMode("Exact/Approx","Approximate")
setMode("Display Digits","float 12")
"x"»usp
"x"»uvc
"x"»cmpu
Dialog
Title "CM Per Unit"
Request "U Sale $",usp
Request "U Var $",uvc
EndDlog
expr(usp)»usp
expr(uvc)»uvc
expr(string(usp-uvc))»cmpu
Dialog
Title "CM Per Unit"
Text "CM Peer Unit is:"&string(cmpu)
EndDlog
Goto Top

Lbl cmratio
ClrHome
ClrIO
getmode("ALL")»mode
setMode("Exact/Approx","Approximate")
setMode("Display Digits","float 12")
"x"»cmpu
"x"»usp
Dialog
Title "CM Ratio"
Text "Be sure you know CMPU"
Request "CMPU",cmpu
Request "Unit Sale $",usp
EndDlog
expr(cmpu)»cmpu
expr(usp)»usp
expr(string(cmpu/usp))»cmr
Dialog
Title "CM Ratio"
Text "CM Ratio is:"&string(cmr)
EndDlog
Goto Top

Lbl besales
ClrHome
ClrIO
getmode("ALL")»mode
setMode("Exact/Approx","Approximate")
setMode("Display Digits","float 12")
"x"»vc
"x"»fc
Dialog
Title "Break Even Sales"
Request "Var Costs",vc
Request "Fix Costs",fc
EndDlog
expr(vc)»vc
expr(fc)»fc
expr(string(vc+fc))»bes
Dialog
Title "Break Even Sales"
Text "BE Sales are:"&string(bes)
EndDlog
Goto Top

Lbl beunit
ClrHome
ClrIO
getmode("ALL")»mode
setMode("Exact/Approx","Approximate")
setMode("Display Digits","float 12")
Dialog
"x"»cmpu
"x"»fc
Title "REMEMBER!!!"
Text "You must know Fix costs and CMPU"
Request "CMPU",cmpu
Request "Fix Costs",fc
EndDlog
expr(cmpu)»cmpu
expr(fc)»fc
expr(string(fc/cmpu))»bepu
Dialog
Title "Break Even Units"
Text "BEinU is:"&string(bepu)
EndDlog
Goto Top

Lbl bepdol
ClrHome
ClrIO
getmode("ALL")»mode
setMode("Exact/Approx","Approximate")
setMode("Display Digits","float 12")
"x"»fc
"x"»cmr
Dialog
Title "REMEMBER!!!"
Text "Fix Costs and CM Ratio"
Request "Fix Costs",fc
Request "CM Ratio",cmr
EndDlog
expr(fc)»fc
expr(cmr)»cmr
expr(string(fc/cmr))»bepd
Dialog
Title "BE in Dollars"
Text "BE $$ is:"&string(bepd)
EndDlog
Goto Top

Lbl mosd
ClrHome
ClrIO
getmode("ALL")»mode
setMode("Exact/Approx","Approximate")
setMode("Display Digits","float 12")
"x"»as
"x"»bes
Dialog
Title "MS In $$"
Text "You must know BE Sales!!"
Request "Act(exp) $$",as
Request "Br EV Sales",bes
EndDlog
expr(as)»as
expr(bes)»bes
expr(string(as-bes))»msd
Dialog
Title "Mar Saft in $$"
Text "MSD is:"&string(msd)
EndDlog
Goto Top

Lbl mosr
ClrHome
ClrIO
getmode("ALL")»mode
setMode("Exact/Approx","Approximate")
setMode("Display Digits","float 12")
"x"»msd
"x"»as
Dialog
Title "REMEMBER!!!"
Request "MS In $$",msd
Request "Act. Sales",as
EndDlog
expr(msd)»msd
expr(as)»as
expr(string(msd/as))»msr
Dialog
Title "MS Ratio"
Text "MS Ratio is:"&string(msr)
EndDlog
Goto Top

Lbl rsales
ClrHome
ClrIO
getmode("ALL")»mode
setMode("Exact/Approx","Approximate")
setMode("Display Digits","float 12")
"x"»tni
"x"»fc
"x"»cmr
Dialog
Title "Required Sales"
Request "Fix Cost",fc
Request "Target NI",tni
Request "CM Ratio",cmr
EndDlog
expr(fc)»fc
expr(tni)»tni
expr(cmr)»cmr
expr(string((fc+tni)/cmr))»rs
Dialog
Title "Required Sales"
Text "Required Sales are:"&string(rs)
EndDlog
Goto Top


Lbl end
ClrIO
DispHome
EndPrgm

------------------
<A HREF="http://www.pianomahnn.com" TARGET=_blank><IMG SRC="http://www.pianomahnn.com/logo.jpg" border=0></A>

Pianomahnn
05-09-2001, 12:54 AM
It computes some cost-volume-profit numbers for analyzing companies. Just something to make my life easier.

Accounting is kewl.

------------------
<A HREF="http://www.pianomahnn.com" TARGET=_blank><IMG SRC="http://www.pianomahnn.com/logo.jpg" border=0></A>

Koliedrus
05-09-2001, 06:52 AM
AHHHH!

That gave me a boner!

Shit. I'll not joust with OrganBoy just to prove I'm hetero.

Nice abs, though http://www.thehypertribe.net/ubb/wink.gif

------------------
Subdivided.

Poteen
05-09-2001, 07:36 AM
Phew.. That made me dizzy !

------------------
I have nothing useful to put here right now...

Dog Breath
05-09-2001, 03:44 PM
<BLOCKQUOTE><HR>Originally posted by Pianomahnn:
It computes some cost-volume-profit numbers for analyzing companies. Just something to make my life easier.

<FONT COLOR="red">Accounting is kewl.</FONT c>

[/quote]

No it isn't!
Financial calcs make me ill.

Write one that calculates modulus of elasticity. OOH BABY YEAH!!!!!
I wrote one that calculates muzzle energy, power factor, and recoil for my radio shack calculator. Much easier math but infinitely cooler!!!



------------------
Woof.
If it's so sick, why are you laughing?
<IMG SRC="http://sites.netscape.net/mydogbreath/dogbre2.gif" border=0>

skalie
05-10-2001, 12:49 AM
Jeez, I just wanted to go to your forum to tell you how much I ph33r 7our l33t programming skillz, but it seems to be down.