how index a variable int

Good morning, I'd need to know how to index a variable int, I am attaching the code, instead of using "if" with the pointer, the index variable rx1 ... RX2 ... RX100
Thank you

 if (Serial.available() > 0) {   
    integerValue = 0;         
    while(1) {            
      incomingByte = Serial.read();
      if (incomingByte == ',') break;                              // esce se arriva  "'"
      if (incomingByte == -1) continue;                         // controlla che non siano caratteri
      integerValue *= 10;                                           // sposta a sinistra di un posto decimale
                                                               
      integerValue = ((incomingByte - 48) + integerValue);   
    }
    puntatore = puntatore + 1;

 }
  

    
 if (puntatore == 0){rx0 = integerValue; } if (puntatore == 1){rx1 = integerValue; }................
 if (puntatore == 100){rx100 = integerValue; }


 
if (puntatore == 100){puntatore = -1;}

Hello,

It's time for you to learn about arrays :wink:

  rx0 = integerValue;
} if (puntatore == 1) {
  rx1 = integerValue;
} ................
if (puntatore == 100) {
  rx100 = integerValue;

Looks like a job for an array to me

    integerValue = ((incomingByte - 48) + integerValue);
    rx[puntatore ] = integerValue ;

You are calling read() without first checking available() is returning more than zero.