Creating the default Go Go compiler

Is there any way to get the Go compiler to use int64 by default on my system? I am writing code for the Euler project on my 64-bit machine. There is little chance that the code will be split, so there is no worry about running it on a 32-bit machine.

+6
source share
1 answer

The int type in go will be 64 bits on 64-bit machines in the next version of version 1.1. If you download the latest development code, you can use it now.

It is not possible to force an int be a specific size. However, when you use int , you should never take a specific size. Instead, explicitly enter your numbers as int64.

+16
source

All Articles