Skip to content

Instantly share code, notes, and snippets.

@panda850819
Created April 20, 2019 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save panda850819/6eb0279dc2c7d1df34a4a3523feb729d to your computer and use it in GitHub Desktop.
Save panda850819/6eb0279dc2c7d1df34a4a3523feb729d to your computer and use it in GitHub Desktop.
Markdium-CryptoZombie
uint8 a = 5;
uint b = 6;
// throws an error because a * b returns a uint, not uint8:
uint8 c = a * b;
// we have to typecast b as a uint8 to make it work:
uint8 c = a * uint8(b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment