GravaEEPROM/LeEEPROM problems

Good evening

More strange things...
I need your hekp once again, please...

int intHora;
const int nHoras=2;

int LeEEPROM(int ID){
EEPROM.read(ID);
}

void GravaEEPROM(int ID, int Valor){
EEPROM.write(ID,Valor);
}

GravaEEPROM(nHoras,19);
intHora=LeEEPROM(nHoras);

intHora gives me 787!!!

but if I do the following:

EEPROM.write(nHoras,19);
intHora=EEPROM.read(nHoras);

intHora gives me 19...

I don't get the difference...

Please let me know
Thanks on advance

Pedro Ferrer

Good evening

Back at ya!

int LeEEPROM(int ID){
     [glow]return([/glow] EEPROM.read(ID) [glow])[/glow];
}

Thanks.
Miss that... I was sleeping.

Thanks once again
Best regards
Pedro Ferrer