Hello together,
may someone can help me.
I would like to sum all byte values inside a string or byte array.
Ok I can do this byte to byte.
Example Byte String/ARRAY: Test_byte[5]
sum_byte_int = Test_byte[0] + Test_byte[1] + Test_byte[2]......and so on!!
But I´m looking for a more elegant way to do it.
BR
Dirk
Adding Byte values inside a ARRAY
-
- Posts: 89
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 04, 2020 11:03 am
- Has thanked: 6 times
- Been thanked: 12 times
-
- Valued Contributor
- Posts: 771
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 151 times
- Been thanked: 173 times
Re: Adding Byte values inside a ARRAY
Hi Dirk
What about this way?
And make sure that the sum is not greater than the maximum value of an integer
regards
Stefan
What about this way?
And make sure that the sum is not greater than the maximum value of an integer
regards
Stefan