the error is not caused by that

Code:
 SDC_Page  var byte
 Event_Record_IDX   var word
                           
  Event_Record_IDX =1023
  while  Event_Record_IDX >64
  
  SDC_Page=   Event_Record_IDX- (Event_Record_IDX//256) *256
 
  Event_Record_IDX=Event_Record_IDX-64
 
  wend
compiles with 0 errors