Parantheses check
Posted: Wed Aug 31, 2005 2:49 pm
I use textpad to write math equations that contain large numbers of parantheses. How do can I make textpad check for balanced parantheses in an equation or line?
Code: Select all
Script for BalParenOnLine
1 ;;from a place in the line
2 <h><h>......;;go to begin line
3 (f){(}......;;find first (
4 (f){;\|$}...;;find either ; or eol
5 (f)(up){[[:graph:]]} ;;find prev. char.
6 ->..........;;get off the char
7 ))))))))))..;;insert 10 )s
8 <h><h>......;;beginning of line
9 (f){(}......;;find the first (
10 <cm>.......;;find the matching )
11 ->..........;;get off the char.
12 (f){)*}.....;;find remaining )s