remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
remix-project/libs/remix-analyzer/test/analysis/test-contracts/solidity-v0.4.24/forLoopIteratesOverDynamicA...

22 lines
503 B

pragma solidity ^0.4.22;
contract forLoopArr {
uint[] array;
constructor(uint[] _array) {
array = _array;
}
function shiftArrItem(uint index) returns(uint[]) {
for (uint i = index; i < array.length; i++) {
array[i] = array[i+1];
}
return array;
}
5 years ago
function shiftArrItem2(uint index) returns(uint[]) {
for (uint i = index; i < array.length - 1; i++) {
array[i] = array[i+1];
}
return array;
}
}