|
-
Nov 7th, 2007, 01:50 AM
#1
Thread Starter
New Member
i need help... thks lots
hi.. i doing a proj on this wireless messaging application using C#. i cant understand the code as i am weak in this area. i wish that someone out there able to tell me wat does this statements mean... apreciate greatly !!
for (i = 1; i <= result.Length; i++)
{
serialData[i + 3] = Convert.ToByte(System.Convert.ToInt32(result[i - 1]));
}
//Calculates the 8 bit checksum
intCheck = 0;
for (i = 0; i <= result.Length + 4; i++)
{
intCheck = intCheck + serialData[i];
intCheck = intCheck & 0xFF;
}
if (intCheck > 127)
{
intCheck = intCheck ^ 0xFF;
}
(Rate)
-
Nov 7th, 2007, 10:16 AM
#2
Re: i need help... thks lots
Do you not understand any of it, or just one particular part?
Most if it looks fairly straightforward.
-
Nov 8th, 2007, 09:53 AM
#3
Thread Starter
New Member
Re: i need help... thks lots
ooops i dun understand quite alot of part... pardon for the stupidity over this area.. hehe..
like ..
for (i = 1; i <= result.Length; i++) ----> why is this statement mean ??{
serialData[i + 3] = Convert.ToByte(System.Convert.ToInt32(result[i - 1]));
}
//Calculates the 8 bit checksum
intCheck = 0;
for (i = 0; i <= result.Length + 4; i++)
{
intCheck = intCheck + serialData[i];
intCheck = intCheck & 0xFF;
}
if (intCheck > 127) -----> this means if int check greater than 127 then = int check ^0xFF right??? then wat does tis sent mean???
{
intCheck = intCheck ^ 0xFF;
}
thks for the reply.. i have no choice but to complete this as it is given by my school. but my foundation for this is not strong at all!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|