1

I started with a basic HelloWorld example.

pragma solidity ^0.4.0;
 contract HelloWorld
  { 
     String str="Hello World";
  }

How can we print this str and check in remix ide?

2

Solidity is a contract-oriented, high-level language for implementing smart contracts. It was influenced by C++, Python and JavaScript and is designed to target the Ethereum Virtual Machine (EVM).

Solidity is a little bit different from other programming languages which many people got used to. There is no console and input/output is different. Basically if you want to print something you just return this value to the outsiders call.

Remix browser will print detailes of the call or transaction in its own console when you call function with return value or you call the variable with visibility public.

contract HelloWorld { 
     string public str = "Hello World";
}

stepone steptwo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.