![]() |
| Categories | Language |
I’ve installed Parser some time ago and do not remember which version I have installed. Can I learn that?
May I use in text special characters “;”, “^”, “$” and so on?
^table.menu{…}[^; ]
I read some text with tags from file/database, but in output to user’s browser they got replaced to < and hence are not handled by browser. But I want that data to be output “as is”. What should I do?
I’m bored to write in all classes some certain construction, what could be done?
I want to output $name.jpg, but get strange error instead, what’s up?
${name}.jpg
Why? Because there should be destinction between this and…
$table.field…this. So Parser would know that dot is not part of syntax, and does not mean that Parser should get “jpg” field of ”name” object. I want to output values of two variables $a and $b one right after the other. But code $a$b outputs nothing.
How to add tab or newline characters to replace table for ^string.replace[$replace_table]?
Construction $tReplace[^table::create[nameless]{^#0A <p>}]
results in error message.
$tReplace[^table::create{from to
^taint[^#0A] <p>}]
And after calling ^sMyString.replace[$tReplace] all newline characters would be replaced to <p>
How to add a line to arbitrary place in a table object and how to change a table cell?
I want for operator to step not by 1
@steppedfor[name;from;to;step;code]
$caller.$name($from)
^while($caller.$name<=$to){
$code
^caller.$name.inc($step)
}
Now you can write…
@somewhere[][i]
^steppedfor[i](1;10;2){$i }
…local variable of somewhere method is changed.
I want foreach to output hash elements in the order I specify, now it enumerates them ad hoc.
@foreach[h;key;value;code;order_direction][tkey]
$tkey[^h._keys[]]
^tkey.sort{$tkey.key}[^if(def $order_direction){$order_direction}{asc}]
^tkey.menu{
$caller.$key[$tkey.key]
$caller.$value[$h.[$tkey.key]]
$code
}
Example of usage:
^foreach[$myhash;k;v]{
key=$k
value=$v
}[desc]
|
| E-mail: mailbox@parser.ru | Copyright © 1997–2011 | Art Lebedev Studio |