Thread: I hate "C"
View Single Post
  #3   Spotlight this post!  
Unread 20-01-2007, 00:21
Jake M Jake M is offline
void* Jake;
FRC #1178 (DURT)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Missouri
Posts: 118
Jake M has a spectacular aura aboutJake M has a spectacular aura about
Re: I hate "C"

You know, I don't quite see why you converted everything to long. The two types are essentially the exact same: both are signed, 4 byte numerical variables. It is strange that you would have this problem by switching this yes, but I don't see why you would think it would change anything. In my experiences, I've never seen any difference at all between the two, except for the name. (I may be missing something, but if I am, then I'll learn something here too) If you were trying to make the variable larger, to prevent overflow, the only way you can go bigger is to use a long long or long long int.

Also, could you provide some sample values that those variables might have. If it is indeed a casting problem, and I have an idea of what those values should be, I can run some test code and probably figure it out.
__________________
Code:
void function(void)
 {
  function();
 }

Last edited by Jake M : 20-01-2007 at 00:33.