Understanding the Solidity syntax

For understanding the syntax, let's take a look at the Solidity file MetaCoin.sol. The following screenshot will act as a guide so that we understand every line of code:

As you can see, every Solidity file begins with the definition of the Solidity version that you are currently using. In this case, that would be 0.4.17. This is immediately followed by the importing of the conversion library (commonly known as ConvertLib.sol). This is shown the the code block as follows: 

pragma solidity ^0.4.17;library ConvertLib{ function convert(uint amount,uint conversionRate) public pure returns (uint convertedAmount) ...

Get Ethereum Projects for Beginners now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.