Hello,
I want to create a list and populate it with the following entries: AB63, AB64,... AB79, AC63,...AZ79.
Unfortunately, I have not been able to figure out how to increment hexadecimally ("J" = Hex(4A) ,etc.)
So, for the letters J-O (Hex4A - Hex4F), I created separate loops, which is very cumbersome.
Does anyone know of a way to increment hexadecimally, so I can keep this all within one loop?
Thank you for your help.
Kevin
JMP17
// Loop rows AB-AI; loop columns 63-79
// A = ASCII (41)
// I = ASCII (49)
For( firstChar = 41, firstChar < 42, firstChar++,
For( secondChar = 41, secondChar < 50, secondChar++,
For( number = 63, number < 80, number++,
// Build the list element
firstCharVal = Hex To Char( Char( firstChar ) );
secondCharVal = Hex To Char( Char( secondChar ) );
dataList[listIndex] = firstCharVal || secondCharVal || Char( number );
// Increase the index
listIndex++;
);
);
);
// Loop row AJ; loop columns 63-79
// J = ASCII (4A)
For( firstChar = 41, firstChar < 42, firstChar++,
For( number = 63, number < 80, number++,
// Build the list element
firstCharVal = Hex To Char( Char( firstChar ) );
dataList[listIndex] = firstCharVal || Hex To Char( "4A" ) || Char( number );
// Increase the index
listIndex++;
);
);
Kevin Doran