Blogging Community solidity Archives - Technologies In Industry 4.0

Literals And Integers in Solidity

Solidity

Literals Solidity gives the usage of literal for assignments to variables. Literals don’t have names; they’re the values themselves. Variables can change their values during program execution, but a literal remains an equivalent value throughout. Take a glance at the subsequent samples of various literals: Ilustrations of integer literals are 1, 10, 1,000, -1, and -100. Examples of string literals are “Ritesh” and ‘Modi’. String literals are … Read more

Solidity Exception And Error Handling

  Solidity Exception And Error Handling

Introduction Writing contracts is that the fundamental purpose of Solidity. However, writing a contract demands sound error and exception handling. Errors and exceptions are the norms in programming and Solidity provides ample infrastructure for managing both. Writing robust contracts with proper error and exception management is one of the highest best practices. Events are another important construct in Solidity. … Read more

How to Write Smart Contracts by Solidity?

How to Write Smart Contracts by Solidity?

Description We use Solidity to write smart contracts. Solidity delivers rich object-orientation. Basically, Smart contracts are code segments and programs, which are organized and executed in EVM. Generally, a contract is a term used in the legal world. It has little significance in the programming world. It doesn’t mean to write a smart contract in … Read more

What Are Solidity Expressions?

What Are Solidity Expressions?

Introduction A programming language has an important aspect of taking decisions in code. Solidity delivers the if…else and switch statements to execute different instructions based on circumstances. This is too significant to loop through multiple items. Solidity provides different constructs such as for loops and while statements. Solidity expressions A statement, comprising multiple operands and … Read more