I currently have a situation where I have variables like this:
uint8 _variable1 = 4; uint8 _variable2 = 2; uint8 _variable3 = 99; uint8 _variable4 = 1; uint8 _variable5 = 0; uint8 _variable6 = 2; uint8 _variable7 = 1; uint8 _variable8 = 34;
When I have to pass or return these values (since Solidity doesn't report Structs as parameters or return values) I keep running into this issue:
CompilerError: Stack too deep, try removing local variables.
The usage of the function to retrieve these values looks like this:
uint8 _variable1; uint8 _variable2; uint8 _variable3; uint8 _variable4; uint8 _variable5; uint8 _variable6; uint8 _variable7; uint8 _variable8; (_variable1, _variable2, _variable3, _variable4, _variable5, _variable6) = dataContract.getData(_id);
What I would like to do instead is store a single variable such as
uint64 data = 0402990100020134
How would I correctly define that in solidity?
If I wanted to get the value of variable 6, how would I do that?