Iteration over virtual pins

Hi everybody,

I am wondering if it is possible to save the name of a virtual pin lets say V30 in a variable and then use a loop to do something with the virtual pins V30 - V37 for example.
Something like:

String vPrefix = "V";
int vBaseNumber = 30;
for (int i = 0; i < 8; i++){
  String vPin = "vPrefix" + (vBaseNumber + i);
  Blynk.syncVirtual(vPin);
}

I know there is the syncAll() function but it is just an example of what i want to do.

I’m currently trying to enhance the readability of my sketch as it is growing pretty much.
This kind of organisation would really help me clean the sketch up.

Hello. Yes. https://github.com/blynkkk/blynk-library/blob/master/examples/More/PrintAllVirtual/PrintAllVirtual.ino

no, you don’t need to prepend the prefix:

for(int i = V30; i< V38; i++) {
}

should work