# Mathematical UDF's

## 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

\$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.

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

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

;Or Return \$z1, \$z2

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)

##### Share on other sites

Look around the board, PacMan made a good string calculator.

If you can't find it (seeking is extremly hard in big board like this one...) you can extract it from Run! source code...

##### Share on other sites

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.

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
×
• Create New...