hi everyone,

I have the following array:

Hi, its great to see you visiting our forum. Why not try Proton Compiler for FREE?

Download the FREE version of Proton Compiler, Its called Amicus18 and its available from HERE

Already using proton Compiler??? Get rid of these pesky messages... get LICENSED USER STATUS




Code:
  'Symbol LQU = SW_Main_Val[0].0
            'Symbol LQR = SW_Main_Val[0].1
            'Symbol LQD = SW_Main_Val[0].2
            'Symbol LQL = SW_Main_Val[0].3
            'Symbol RQU = SW_Main_Val[0].4
            'Symbol RQR = SW_Main_Val[0].5
            'Symbol RQD = SW_Main_Val[0].6
            'Symbol RQL = SW_Main_Val[0].7
            
            'Symbol LS3 = SW_Main_Val[1].0
            'Symbol LS4 = SW_Main_Val[1].1
            'Symbol LS5 = SW_Main_Val[1].2
            'Symbol LS6 = SW_Main_Val[1].3
            'Symbol LS7 = SW_Main_Val[1].4
            'Symbol LS8 = SW_Main_Val[1].5
            'Symbol LS9 = SW_Main_Val[1].6
Don't mind the "Symbol" Alias, it is there for reference sakes. I have an array of bytes. "SW_Main_Val"

Each byte's Bit represents an IO.

I need to somehow represent each of those bits with a Number. So i would have something like this:

SW_Main_Val[1].3 would be number 25
SW_Main_Val[1].4 would be number 26 and so on.

I need this so i can then assign a variable to the number. I have an array of functions to which i want to assign each of the IO's manually by doing the following:

Code:
CData     11,1,0,_  'Menu Enter         DR         NONE
Where 11 is the Byte Array Byte Number and 1 is the Bit number (Never mind the third one it's irrelevant)

Then i say:

Code:
Func_Assign_SW_Tmp_Byte_N = 11
Func_Assign_SW_Tmp_Bit_N = 1
Func_Assign_SW_Tmp_Byte = SW_Main_Val[Func_Assign_SW_Tmp_Byte_N]
MyFunction = GetBit Func_Assign_SW_Tmp_Byte, Func_Assign_SW_Tmp_Bit_N
But i need each of the bits in the entire array to be associated with a Single number and not two of them so i can reference things faster.

I know the thought is a bit complicated so if there are any questions then ask. I would really appreciate it if anyone could suggest something.