• Welcome to Valhalla Legends Archive.
 

File Transfer with VB Express 2005

Started by Killer360, October 02, 2006, 06:02 PM

Previous topic - Next topic

K

Quote from: Joex86] link=topic=15816.msg159344#msg159344 date=1159845640]
I still can't program a calculator in VB without much effort, other than simple four-function that can work with only two values. After that it gets quite hard to find the next operation, position wise.

Convert the equation from infix to postfix.
Go through each token from left to right.
If the token is a number, push it onto a stack.
If the token is an binary operator, pull two values from the stack and evaluate.  push the result back onto the stack.
Continue until you have run through each token.  If the equation was valid, there will be only one result left on the stack.

This approach is simpler than constructing a parse tree, but it has some limitations.  It is difficult to account for unary operators such as a negative sign or a factorial operator when converting from infix to postfix.

Zer0

here is the easiest way to do it..... or so i think


        hashStatus.Text = "Downloading..."
        Dim wc As New System.Net.WebClient()
        wc.DownloadFile("http://www.allieszer0.com/hash/star/starcraft.exe", _
                 App_Path() + "/star/starcraft.exe")
        wc.DownloadFile("http://www.allieszer0.com/hash/star/battle.snp", _
                 App_Path() + "/star/battle.snp")
        wc.DownloadFile("http://www.allieszer0.com/hash/star/storm.dll", _
                 App_Path() + "/star/storm.dll")
        hashStatus.Text = "Done SC..."