Cheers Rob, I'll certainly read that.
On Mon, 11 Feb 2019 at 20:53, Rob Pike wrote:
> You might find blog.golang.org/constants helpful.
>
> -rob
>
>
> On Tue, Feb 12, 2019 at 5:04 AM Jamie Caldwell <
> mr.jamie.caldw...@gmail.com> wrote:
>
>> Thanks for the help and quick response Tyler.
>>
>>
You might find blog.golang.org/constants helpful.
-rob
On Tue, Feb 12, 2019 at 5:04 AM Jamie Caldwell
wrote:
> Thanks for the help and quick response Tyler.
>
> On Mon, 11 Feb 2019 at 17:56, Tyler Compton wrote:
>
>> Constant expressions like 'A' or 3 or named constants like "const x = 7"
>>
Thanks for the help and quick response Tyler.
On Mon, 11 Feb 2019 at 17:56, Tyler Compton wrote:
> Constant expressions like 'A' or 3 or named constants like "const x = 7"
> are what Go calls "untyped constants". The type of these constants are
> determined by the context in which they're used.
Constant expressions like 'A' or 3 or named constants like "const x = 7"
are what Go calls "untyped constants". The type of these constants are
determined by the context in which they're used. For example:
const myConst = 3
myFloat := 2.5
fmt.Println(myFloat + myConst)
fmt.Println(myFloat + 3)
Hello,
Can you help?
https://play.golang.org/p/XfJZ3h06p60
Why does 'A' work, when first assigning it to a variable doesn't?
Thank you,
Jamie.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving