Thread: Some parsers
View Single Post
  #17  
Old 01-08-2008, 11:08 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Tolnaftate2004 View Post
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.)

Hmm, well atm it looks for the first endtag that it finds and will work from there, will need to add some more checks to support multiple tags inside eachother :o

Quote:
Originally Posted by Tolnaftate2004 View Post
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...]
hehe, thanks

Will improve it, thanks PFA
__________________
Reply With Quote