fred,
Thanks for your reply.
The best I can get from looking at it (Macro) is that it is manipulating the unsigned long array using bitwise operators.
for example the unsigned long starts out as a Zero value (i.e. 0000000000000000 ) then the macro is passed in a different long array value ..... such as 0000000000000001 or 0000000000008000 along with it's corresponding 'reference number' that could be a number between 1-60). The long values are added together to make the final value 0000000000008001.
I have actually gotten this to work but by using an entirely different design approach, however, it took me several weeks to come up with the way this works. Basically I created a new class composed with Enum values with each possible value that can used such as...
public Enum enumValues
{
private static long VALUE_1 0000000000000001;
private static long VALUE_2 0000000000000002;
private static long VALUE_3 0000000000000004;
private static long VALUE_4 0000000000000008;
private static long VALUE_5 0000000000001000;
private static long VALUE_6 0000000000002000;
private static long VALUE_7 0000000000004000;
private static long VALUE_8 0000000000008000;
....
public
String getNewValue(long currentValue, long refNumber)
{
return calculateValue(currentValue, refNumber);
}
private String calculateValue(long currentValue, long newValue)
{
// add NewValue to currentValue using packed decimal notation.
return newValue;
}
}
I then add the current value with any new values using packed decimal addition to get the final value.
This does work, however, I am wondering if there is a cleaner/more efficient approach to doing this.