[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] It seems that [if]tag return nothing when result is 0.
I have strange behavior of [if] tag below.
I want to have 0 or 1 from the following sample.
In case of A or B , It works.
It seems that [if]tag return nothing when result is 0.
Is that right? Am I something wrong?
Murahashi
TEST.HTML
=========
[set arg]Y[/set](1)arg=[scratch arg]<br>
result=[if scratch arg eq "Y"]1[else]0[/else][/if]<br>
[set arg]N[/set](2)arg=[scratch arg]<br>
result=[if scratch arg eq "Y"]1[else]0[/else][/if]<br>
[set arg]Y[/set](3)arg=[scratch arg]<br>
result=[if scratch arg eq "Y"]1[else]0 [/else][/if]<br> <!--0 with space -->
[set arg]N[/set](4)arg=[scratch arg]<br>
result=[if scratch arg eq "Y"]1[else]0 [/else][/if]<br> <!--0 with space -->
---------------<br>
[set arg]Y[/set](1)arg=[scratch arg]<br>
result=[if scratch arg eq "Y"]A[else]B[/else][/if]<br>
[set arg]N[/set](2)arg=[scratch arg]<br>
result=[if scratch arg eq "Y"]A[else]B[/else][/if]<br>
[set arg]Y[/set](3)arg=[scratch arg]<br>
result=[if scratch arg eq "Y"]A[else]B [/else][/if]<br> <!--B with space -->
[set arg]N[/set](4)arg=[scratch arg]<br>
result=[if scratch arg eq "Y"]A[else]B [/else][/if]<br> <!--B with space -->
RESULT
======
(1)arg=Y
result=1
(2)arg=N
result=
(3)arg=Y
result=1
(4)arg=N
result=0
---------------
(1)arg=Y
result=A
(2)arg=N
result=B
(3)arg=Y
result=A
(4)arg=N
result=B