0

Expected primary expression. j* = 10; ^ enter image description here

$ truffle migrate Error parsing C:\Users\Welcome\Downloads\ethereum-dapp\contracts\Integers.sol: ParsedContract.sol:29:16: ParserError: Expected primary expression. j* = 10; ^ Compilation failed. See above.

3
  • function parseInt(string _value) public returns (uint _ret) { bytes memory _bytesValue = bytes(_value); uint j = 1; for(uint i = _bytesValue.length-1; i >= 0 && i < _bytesValue.length; i--) { assert(_bytesValue[i] >= 48 && _bytesValue[i] <= 57); _ret += (uint(_bytesValue[i]) - 48)*j; j* = 10; this is my contract Nov 16, 2018 at 18:14
  • Can you edit and put the code in the main question? With formatting. Nov 16, 2018 at 18:39
  • Would this be better j *= 10;? Nov 16, 2018 at 18:40

1 Answer 1

1

You've given space between '*' and '=' in j* = 10; , it's like this:

    j *= 10;

Good Luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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