You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2002/03/23 12:57:59 UTC
DO NOT REPLY [Bug 7387] New: -
Logical not operator works wrongly in #set
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7387>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7387
Logical not operator works wrongly in #set
Summary: Logical not operator works wrongly in #set
Product: Velocity
Version: 1.2
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: Source
AssignedTo: velocity-dev@jakarta.apache.org
ReportedBy: ddekany@freemail.hu
Logical not produces bad results in #set-s while it works fine in #if-s (!?).
Comments in the
example shows what 1.3 Nightly 22/03 will print. 1.2 Stable produces null-sets. (Note that
bugzilla don't offer version 1.3-rc1.)
#set($x = !true)
$x ## true (wrong)
#set($y =
true)
#set($x = !$y)
$x ## true (wrong)
#set($y = false)
#set($x = !false)
$x ## false
(wrong)
#set($x = !$y)
$x ## false (wrong)
#set($x = !'foo')
$x ## false (good)
#set($y = 'foo')
#set($x = !$y)
$x ## true (wrong)
#set($x = !1)
$x ## false (good)
#set($y = 1)
#set($x = !$y)
$x ## true (wrong)
(Please ingnore false line breaks inserted
by bugzilla)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>