Now why can i only get my wright results by using these codes.
You only showed one end. We can't see what you are doing on the other end.
I mean why should the value variable in arduino sketch be an int.
Because that is what the digitalRead() function returns. The variable can be a different type, it circumstances warrant it.
And if it can be a float how do i do it?
float someCrap = 3.14159;
do we always declare the pin number with an int?
Until you can figure out how to use pin 3.7, yes.
When i use a float either for declaring only the variable or both the variable and the pin i continue getting the wright result on the arduino screen but cant read the right values in processing.
No proof anywhere.
Does it even matter in what kind of variable i store the port.read in the processing sketch since the serial values always get to processing in ascii format?
Well, of course it does. What you are reading from the serial port is text. Nothing else. The characters are transmitted using ASCII codes, so they are numeric values, but you need to make Processing aware that the stuff you are reading is text, first, and then convert the text to int, float, whatever.
That statement you have works ONLY because the int being sent is a single digit. If you try sending an analogRead() value that way, it will not work.
Your Processing code is assuming that the '0' or '1' being sent is really an int. While it is, the int value is not 0 or 1. It is is 48 or 49.
I havent found documentation for these queries..
You aren't looking in the right places, then.
What i want to finally do when i no enough is graph the temperature that is estimated by a circuit connected to my arduino and which ends up in an 8bit value(the temperature comming out of an adc0804).So i have 8 inputs on 8digital pins on the arduino and have to make an equation according to my external circuit and send the final value to processing in order to graph nicelly with gwoptics library.The value will always be a float(maybe i'll have to make it an int to work!!)
Because Processing runs on a far more powerful device, sending a single byte, using Serial.write(), makes more sense than converting the byte to a float, then converting the float to a string, then sending the string, then reading the string, then converting the string to a float, then using the float.