Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt in EL  RSS feed

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
referring to EL in HFSJ(page no. 395), it is given that, "In logical expressions, EL treats the unknown variable as "false".
The example given for this is:

${7 < foo} false

according to this, it will get evaluated as

${7 < false}

How would you compare this ???

Another example given is

${true and foo} false

It wil get evaluated as

${true and false} false

This is OK.

But wht about the previous one ?
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

For unknown variables, in numeric comparisions it is treated as 0.

thanks
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!