We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › if() wont return true
Page Index Toggle Pages: 1
if() wont return true (Read 665 times)
if() wont return true
Aug 15th, 2006, 1:26pm
 
Hi,

i wrote a little picture programm, but now iam at the end of my knowledge. Because i use this:

if((xmlList[xmlList.length-2]) == (folderList[folderList.length-1]))
       println("hallo");

println(xmlList[xmlList.length-2]);       // return "folder"
println(folderList[folderList.length-1]); // return "folder"

... but the if() function will not return true.

thanks for helping me,
steffen
Re: if() wont return true
Reply #1 - Aug 15th, 2006, 1:40pm
 
See the "Why don't these strings equal?" entry in the FAQ:

http://processing.org/faq/bugs.html#strings
Re: if() wont return true
Reply #2 - Aug 15th, 2006, 1:54pm
 
Hard to get, but this was my mistake.

thanks TomC,
steffen
Re: if() wont return true
Reply #3 - Aug 15th, 2006, 2:12pm
 
It's in the FAQ because it really is a frequently asked question - it's not obvious, you're in good company!
Re: if() wont return true
Reply #4 - Aug 16th, 2006, 11:22am
 
Did you ever use dynamic arrays? I searched for it and found this:

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=print;num=1121804047

.. but is it possible to define my dyn array in the setup() and use the same the draw()?

greatings from dresden(germany),
steffen
Page Index Toggle Pages: 1