On 03/07/2017 07:06 PM, Eric Brown wrote: > memoryBlock[2] = 256 - (187 - memoryBlock[2]) ' results in error: > constant 256 overflows byte
So since you're assigning to a byte I think Go is treating all of the constants as bytes. A byte can only encode between 0 and 255. You need an extra bit (ie, more than a byte) to store 256. Something like the following works but might be silly: memoryBlock[2] = byte(int(256) - (187 - int(memoryBlock[2]))) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.