FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   !!!!  what does the exclamation poit do?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: !!!!  what does the exclamation poit do?  (Read 257 times)
Regina


!!!!  what does the exclamation poit do?
« on: Sep 28th, 2003, 4:28am »

I am working on a proce55ing project, and have an exclamation point put in by somebody else. It works well, but I'm trying to adjust things, and I don't know what its purpose is. What is this used for? Thanks. Regina
 
Bijeoma

myloveiloved
Re: !!!!  what does the exclamation poit do?
« Reply #1 on: Sep 28th, 2003, 4:41am »

i dont completely understand the problem, but its most likely the inequality sign being "!=". if so, the inequality sign just determines if one expression is not equivalent to another. if the two expressions are not equivalent it returns true and if the two expressions are equivalent it returns false.  
 
bryan
 
Regina


Re: !!!!  what does the exclamation poit do?
« Reply #2 on: Sep 28th, 2003, 4:47am »

Yes. That makes sense. Thanks.
 
toxi

WWW
Re: !!!!  what does the exclamation poit do?
« Reply #3 on: Sep 29th, 2003, 3:07pm »

sorry to be picky, but even though the end result of what bijeoma described is correct, the "!" operator works slightly different. it does not evaluate an expression at all, it simply negates it, so that true becomes false and vice versa. it's a fine difference, but ! can also be used in an assigning context, eg. to switch a flag:
 
boolean a=true;
a=!a;
println(a);
a=!a;
println(a);
 

http://toxi.co.uk/
Bijeoma

myloveiloved
Re: !!!!  what does the exclamation poit do?
« Reply #4 on: Sep 29th, 2003, 3:43pm »

ahh yes. hehe. forgot to mention that.
 
bryan
 
Pages: 1 

« Previous topic | Next topic »