Jump to content
Sign in to follow this  

Recommended Posts

Why is the differens in the code below one gives the corrct value and the other not?

 

Regards /Jörgen

 

 

LimitOFF1Temp = eeprom_read(EE_LimitOFF1TempStart+i); //Gives wrong value

 

j = EE_LimitOFF1Temp + i;

LimitOFF1Temp = eeprom_read(j); //Give corrct value.

Share this post


Link to post
Share on other sites
Why is the differens in the code below one gives the corrct value and the other not?
Looks like they should be equivalent. But we can't tell what data types you are using.

Please provide a small (but complete) program demonstrating your problem.

 

Regards

Dave

Share this post


Link to post
Share on other sites

c58_4311,

 

I think that first of all

 

EE_LimitOFF1TempStart+i

and

EE_LimitOFF1Temp + i

 

do not mean the same thing.

Ah yes, I miss the obvious. I often find myself thinking too deep!

 

Regards

Dave

Share this post


Link to post
Share on other sites

HA! HA!, yes Dave you have gone too deep but it seems to me that sdujolo has flown too high into the sky never to return to this forum to look at the answers to his queries!

Share this post


Link to post
Share on other sites
HA! HA!,  yes Dave you have gone too deep but it seems to me that sdujolo has flown too high into the sky never to return to this forum to look at the answers to his queries!

 

 

Sorry... I write the wrong it should be likte below. But it was not that it was stupied me that was out of a array.

 

Thanks any way

 

Regards /Jörgen

 

LimitOFF1Temp = eeprom_read(EE_LimitOFF1TempStart+i); //Gives wrong value

 

j = EE_LimitOFF1TempStart + i;

LimitOFF1Temp = eeprom_read(j); //Give corrct value.

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...