Hello,
I find an error during the compilation of which I can not understand its origin.
It is a mathematical operation on a word variable.
I attach a test list that generates the error and a screen with the generated error.
#OptionExplicit' -'-#Chip16F1847,32#ConfigOSC=INT,MCLR_OFF' -'Timers#DefineMAXTIMERS8#DefineTMR_ORASTARTTimer(0)#DefineTMR_MINUTOSTARTTimer(1)#DefineTMR_ORASTOPTimer(2)#DefineTMR_MINUTOSTOPTimer(3)#DefineTMR_GIORNITimer(4)#DefineTMR_MASKRELETimer(5)#DefineTMR_ATTIVOTimer(6)#DefineTMR_ABILITATOTimer(7)' -'Perlagestionedell'orario dei timers Dim wStart (MAXTIMERS) As Word Dim wStopp (MAXTIMERS) As Word Dim wIncre (MAXTIMERS) As Word Dim Timer (8) As Byte'main:CalcolaValoriTimer(1)End' ========================================================================'Calcolaivaloriconl'orario per la programmazione di tutti i timers'------------------------------------------------------------------------SubCalcolaValoriTimer(InNTimerAsByte)' LeggiTimer NTimer 'ReadfromEEPromwStart(NTimer-1)=[Word]TMR_ORASTART*60+TMR_MINUTOSTART' Ora start wStopp (NTimer -1) = [Word] TMR_ORASTOP * 60 + TMR_MINUTOSTOP 'OraStop'- If wStart (NTimer -1) > wStopp (NTimer -1) Then wIncre (NTimer -1) = wStopp wStopp (NTimer -1) = wStopp (NTimer -1) + 1440 Else wIncre (NTimer -1) = 0 End IfEnd Sub'
Hello,
I find an error during the compilation of which I can not understand its origin.
It is a mathematical operation on a word variable.
I attach a test list that generates the error and a screen with the generated error.
Problem solved !
After two hours of repricing I realized that I had not put the index on the wstop variable.
This is the advancing old age ...
:-)
wIncre (NTimer -1) = wStoppwherewStoppneeded an array index.Easy to do, hard to debug.