tiaxgame
Graham So if nguohp Do not
write "(8-2)" on filelist,
blog, guestbook.
xtscript treated, it will
bar "6"!??
Graham
tiaxgame No that will not work because expressions inside ( and ) are evaluated its not a bug
it is just the way that xtscript works and cannot be changed
if you wish to represent ( and ) in a variable they MUST be escaped or replaced by entities
ie
var $data=(8-2)
var $data=\(8-2\)
There is no other choice unless you use print_raw
print_raw (8-2)
will output (8-2) as nothing is evaluated
tiaxgame
Graham var $data = (8-2)
Var $cp = call chr $val=59
assign $data=call str_replace $subject=$data;$search=(;$replace=($cp;
assign $data=call str_replace $subject=$data;$search=);$replace=)$cp;
Print $data
I want print (8-2)
But i can't replace it
It = 6
Graham
tiaxgame so do you want $input to equal (8-2)
and not 6
or what ?
because I do not understand nor can I see an error
Things in brackets get evaluated thats not an error
if you want to make the variable actually (8-2) you need to use either \
or replace ( and ) with ( and )
tiaxgame
code:
Var $input = (8-2)
Print \$input = $input
=> $input = 6
I want "replace" from "(" to "\(" of $input,
- (no add "\" )
But not replace
And "length" $input = 1
!!!