Thread: Some parsers
View Single Post
  #13  
Old 01-08-2008, 09:54 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Chompy View Post
Yeah, I learned some nifty/nice stuff from that one, so thanks <3
I tried your latest:

PHP Code:
echo(cParseLine("The fourth root of 81 is <sqrt><sqrt>81</sqrt></sqrt>.")); 
The fourth root of 81 is </sqrt>.

PHP Code:
this.test 9;
echo(
cParseLine("The square root of `this.test` is <sqrt><variable>this.test</variable></sqrt>.")); 
The square root of `this.test` is
(I'd like to point out that the period disappeared.)



e: I see you're using if (~some_index). Helpful hint: the engine has to perform twice as many tasks this way. It is more efficient to use the old fashioned if (some_index >= 0). [I know that I used it too...]
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote