Here're the steps I'd take:
- Get rid of all the comments.
- Run it to make sure I didn't break anything
- Put a newline after every single semi-colon
- Run it to make sure I didn't break anything
- Start to fix the logic, renaming variables and the like
- Run it after every single edit, to make sure I didn't break anything
- Start getting rid of filler-code.
- Run it after every single edit, to make sure I didn't break anything
A few tricks to keep in mind:
- *)=5; is a way of making a variable named $* and setting it equal to 5.
- Order of operations is critical.
- Delimiters don't have to be slashes.
That should be enough to get you started.
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.