Page 1 of 1

This code some times returns FALSE, but I want a TRUE result

Posted: Sat Dec 31, 2005 9:57 pm
by danf_1979

Code: Select all

print_f("Make this year your life better than ever. If you're going through difficult times, try to learn from your experience. Nothing happens for no reason. Life is more than you can see. If you got everything but love, then, what do you have? You can change your life thinking a different way. I dont know you, but I do love you. You can love anyone too.");
Happy new year guys! God bless you!

Posted: Sat Dec 31, 2005 10:23 pm
by mickd
printf doesnt return true or false. does it?

if this thread was just to say happy new year, it should of been in the general section ;) anyways, happy new year to you too.

Posted: Sat Dec 31, 2005 11:35 pm
by Ambush Commander
print_f returns an integer, so if you print_f(''), you'll get 0 == false.

Posted: Sun Jan 01, 2006 12:03 am
by josh

Code: Select all

function always_true() {
     return((bool)print_f("Make this year your life better than ever. If you're going through difficult times, try to learn from your experience. Nothing happens for no reason. Life is more than you can see. If you got everything but love, then, what do you have? You can change your life thinking a different way. I dont know you, but I do love you. You can love anyone too.")); 
}

there, that oughtta do it