File: test_func.cs

package info (click to toggle)
clearsilver 0.10.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,304 kB
  • sloc: ansic: 24,586; python: 4,233; sh: 2,502; cs: 1,429; ruby: 819; java: 735; makefile: 589; perl: 120; lisp: 34; sql: 21
file content (30 lines) | stat: -rw-r--r-- 642 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
testing func calls

Testing register strfunc
<?cs var:test_strfunc(Foo) ?>
<?cs var:test_strfunc("Foo" + Foo) ?>


<?cs var:test_strfunc((5,2)) ?>
<?cs var:test_strfunc((5,2) + 2) ?>

testing passing expressions to builtins
<?cs loop:x = 0, 20, 2 ?>
 <?cs var:abs(x - 5) ?>
<?cs /loop ?>

25: <?cs var:max(20-5, 20+5) ?>
15: <?cs var:min(20-5, 20+5) ?>

6: <?cs var:string.length("foo" + "bar") ?>

25: <?cs var:max(20-5, 20+5) ?>

4: <?cs var:subcount(Foo.Bar["Baz"]) ?>
Baz: <?cs var:name(Foo.Bar["Baz"]) ?>

oba: <?cs var:string.slice("foo" + "bar", 5-3, 2+3) ?>

first/last only run on local vars, which can't be created by expressions