Sign in to follow this  
Followers 0
Vindicator209

read and do

5 posts in this topic

#1 ·  Posted (edited)

I dont know if this is the right place to ask this but i have a gui in which you type a long problem, and an edit box below it to show the answer in the V formation, but im not sure if it can be done, like this:

If the problem is (3+4)*5/5-1 (what they type in)

and this is the result:

(3+4)*5/5-1

7*5/5-1

35/5-1

7-1

6

possible?

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites



I dont know if this is the right place to ask this but i have a gui in which you type a long problem, and an edit box below it to show the answer in the V formation, but im not sure if it can be done, like this:

If the problem is (3+4)*5/5-1 (what they type in)

and this is the result:

(3+4)*5/5-1

7*5/5-1

35/5-1

7-1

6

possible?

I don't know if it will always be incrementally shorter with each step (Decimals)

but that should be possible

Share this post


Link to post
Share on other sites

ok i cant find how to do this..is there a command to do this???


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

ok i cant find how to do this..is there a command to do this???

I don't think there is a command that would make this incredibly easy. :)

The only thing that comes immediately to mind would be creating a function (probably recursive) to parse the expression as a string, and break everything down intelligently according to the order of operations. Evaluate each sub-expression and display as you go, then re-feed them.

Shouldn't be terribly hard to pull off. :P

Edited by yutt

It is a waste of energy to be angry with a man who behaves badly, just as it is to be angry with a car that won't go. - Bertrand Russell

Share this post


Link to post
Share on other sites

They'd have to type it correctly of course, or you'd better brush up on some parsing skills:

$factor = ((((3+4) * 5) / 5) - 1)
MsgBox(0, 'Info', Execute($factor))


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
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
Sign in to follow this  
Followers 0