Word Array
I know that there are no Word Arrays in SX/B so What would be a way to simulate them?
There has to be a way. but I'm not saavy enough to figure it out. [noparse]:)[/noparse]
I need a 4 element word array. I'm using an SX-28.
Thanks in Advance for any help,
Regards,
Eric
·
There has to be a way. but I'm not saavy enough to figure it out. [noparse]:)[/noparse]
I need a 4 element word array. I'm using an SX-28.
Thanks in Advance for any help,
Regards,
Eric
·
Comments
Start with some variables:
Declare a subroutine and function
And here is the code for those declarations:
Post Edited (JonnyMac) : 3/9/2007 3:00:08 AM GMT
I get error until I Change
myWords(tmpB1) = tmpB1_LSB <--- To TmpW1_LSB
myWords(tmpB1) = tmpB1_MSB <--- To TmpW1_MSB
I'm still trying to understand what tmpB1 = tmpB1 << 1 is doing can you explain.
Byte variables do not have a _LSB or _MSB suffix.
tmpB1 = tmpB1 << 1 ' means to shift tmpB1 to the left 1 bit (effectively multiplying it by two)
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Educate your children to self-control, to the habit of holding passion and prejudice and evil tendencies subject to an upright and reasoning will, and you have done much to abolish misery from their future and crimes from society"
Benjamin Franklin
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
I understand what "tmpB1 = tmpB1 << 1" means I'm just not sure why he used it in the code above.
Regards,
Eric
Thanks Jonny for the code.··
Declare a subroutine and function
And here is the code for those declarations:
[/code][/size]