fixed scoping for local on for tag.
This commit is contained in:
1 parent
f3b66d9770
commit
9a9abab92d
17 files changed
+751
-233
No files matched your search
+7
-28
@@ -1,31 +1,10 @@
|
||||
*** CGI VARIABLES ***
|
||||
*** GLOBAL VARIABLES ***
|
||||
=[xxx]
|
||||
addition=[8]
|
||||
complete=[ABCD;tohex]
|
||||
division=[1.666666666667]
|
||||
divisor=[8]
|
||||
error=[]
|
||||
include=[yes]
|
||||
ix=[1]
|
||||
lefty=[]
|
||||
modified1=[ABCD]
|
||||
multiplication=[15]
|
||||
nested=[64]
|
||||
newname=[another container value]
|
||||
noeval=[this is the value store in #[name1].]
|
||||
nonexistant=[]
|
||||
numbers=[0123456789]
|
||||
subtraction=[2]
|
||||
theexpr=[bcd]
|
||||
thename=[this is the value store in localname.]
|
||||
tohex=[tohex]
|
||||
varname1=[vardata]
|
||||
x=[]
|
||||
*** LOCAL VARIABLES ***
|
||||
cgi=[true]
|
||||
filterblanklines=[true]
|
||||
localvar=[This is a container set with 'localname']
|
||||
name1=[localname]
|
||||
testinclude=[xThis is a container set with 'localname'x]
|
||||
trimlines=[true]
|
||||
end=[10]
|
||||
ix=[10]
|
||||
iz=[#[iz]]
|
||||
name=[ix]
|
||||
scope=[local]
|
||||
start=[1]
|
||||
step=[1]
|
||||
+5
-2
@@ -1,6 +1,9 @@
|
||||
#!../jet-2.0
|
||||
<jet cgi="true" name1="localname" filterblanklines="true" trimlines="true">
|
||||
<for name="ix" start="1" end="5" step=".1">
|
||||
-->#[ix]<--
|
||||
<set name="iz" value="8" scope="local" />
|
||||
<for name="ix" start="1" end="10" step="1" scope="local" iz="#[iz]">
|
||||
#[scope]
|
||||
<dump file="dump.txt" />
|
||||
-->[iz]-[iy]-#[ix]<--
|
||||
</for>
|
||||
</jet>
|
||||
@@ -1,7 +1,6 @@
|
||||
<set name="localvar" scope="local">This is a container set with '#[name1]'</set>
|
||||
This is from an include tag.
|
||||
localname='#[name1]'
|
||||
$[$xxxx]
|
||||
<set name="include" value="yes" />
|
||||
<set name="testinclude" value="x#[localvar]x" scope="local" />
|
||||
test='#[testinclude]'
|
||||
|
||||
+5
-5
@@ -7,13 +7,13 @@
|
||||
<set name="modified1" value="ABCD" />
|
||||
$[modified1;tohex]
|
||||
<set name="tohex" value="tohex" />
|
||||
$[tohex]
|
||||
$[modified1;$[tohex]]
|
||||
<set name="complete" value="$[modified1];$[tohex]" />
|
||||
$[complete]
|
||||
<set name="" value="xxx" />
|
||||
the unnamed variable value: [$[]]
|
||||
---
|
||||
$[nonexistant]
|
||||
$[%HOME]
|
||||
<set name="ix" value="1" />
|
||||
<set name="theexpr" expr="SUBSTRING('abcdefg', 5 - 4, 20 - 17)" />
|
||||
@@ -23,7 +23,7 @@
|
||||
<set name="division" expr="5/3" />
|
||||
<set name="divisor" value="8" />
|
||||
<set name="nested" expr="(2*(4+4)/$[divisor])*32" />
|
||||
<set name="error" value="$[x]" />
|
||||
<set name="error" value="$[nested]" />
|
||||
$[nested]
|
||||
<set name="numbers">0123456789</set>
|
||||
<set name="lefty" expr="LEFT($[numbers],5)" />
|
||||
@@ -54,11 +54,11 @@
|
||||
456
|
||||
</if>
|
||||
</if>
|
||||
<for name="ix" start="1" end="5" step="1">
|
||||
-->#[ix]<--
|
||||
<for name="ix" start="1" end="5" step="1" scope="local">
|
||||
-->$[ix]<--
|
||||
</for>
|
||||
<call status="rc" pgm="/usr/bin/ls" arg1="-al" name="ls" />
|
||||
$[rc]
|
||||
[rc]
|
||||
$[ls]
|
||||
<read file="../compile" name="file" />
|
||||
$[filex]
|
||||
|
||||
Reference in new issue
Block a user