August 2018
Beginner to intermediate
350 pages
11h 58m
English
Literals are used to represent a fixed value; there are multiple types of literals that are used; they are as follows:
Integer literals are formed with a sequence of numbers from 0 to 9. Octal literals and ones starting with 0 are invalid, since the addresses in Ethereum start with 0. Take a look at this:
int a = 11;
String literals are declared with a pair of double("...") or single('...') quotes, for example:
Test = 'Batman';Test2 = "Batman";
Hexadecimal literals are prefixed with the keyword hex and are enclosed with double (hex"69ed75") or single (hex'69ed75') quotes.
Hexadecimal literals that pass the address checksum test are of address type literal, for ...
Read now
Unlock full access