Jump to content

Mathematical UDF's


themax90
 Share

Recommended Posts

A while back I was working on a calculator until my harddrive fried last night. I made a view UDF's for math and such which ran perfectly in a gui environment.

While 1

;Do gui data

;Calc functions

;If certain button clicked make varable $cans and second num $snum

WEnd

Func Add($cans, $ndata)

$cans = $cans + $ndata

Return $cans

EndFunc

;etc they were all the same but I added ques

Func Que($aque, $sque, $mque, $dque)

;If $m or $d que was true then run certain function and return $cans for further math(running on the system of order of operations, same for $a and $s(a = add, s = subtract and so on, then Return $que and set $que back to 1

EndFunc

I can't remember it exactly because my computer fried, I am sending this post from a library.

Also I made a Quadratic UDF

Func Quad($a, $b, $c)

$z1 = (-($:(+SqRt(($b * $:( - (4 * $a * $c)) / (2 * $a)

$z2 = (-($:-SqRt(($b * $:) - (4 * $a * $c)) / (2 * $a)

MsgBox(0, "Answers", "Your answers are " & $z1 & " OR " & $z2)

;Or Return $z1, $z2

EndFunc Quad

If I can restore my drive I might beable to get my 205 line calculator script that was in beta, all I needed was sqrt functions, and a delete function and I had a full calculator, number CCB-23X(computer Calculator Basic - 23 Button Operational(X))

Hope you like, and I can't remember who made the other autoIt calculator but I might restart my project and make a base from that.

With Scripting Power,

Max Gardner(AutoIt Smith)

Link to comment
Share on other sites

http://www.insolence9.com/downloads/SBN.zip

C# infix->postfix->evaluator. If you need any explaining let me know :(

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...