RSSAmplifier

LakTEK · Jan 12, 2012

Learning Go - Constants & Iota

0
Sign in to vote or save

This page did not load. You can still read it on the original site — the toolbar below keeps your place in the directory.

When you learn Golang, your first encounter with constant declarations can be little confusing. type ByteSize float64 const ( _ = iota // ignore first value by assigning to blank identifier KB ByteSize = 1<<(10*iota) MB GB TB PB EB ZB YB ) Why only the first constant ( KB ) has a value assigned? What does iota means? These are some of the questions that could pop into your mind when you go through…

Read on laktek.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.