how do you describe this in english, not computer?
Person memory newPerson;
is this a statement that exists only within a function? is it the equivalent of x = y even though there is no operator? Does the ‘memory’ sort of act as an equivalence operator?
you can teach an old dog new tricks…just takes us a bit longer
what is WRONG with this function identity statement ( x = x ) or (x memory x)
function createPerson(string memory name,uint age, uint height) public {
Person memory Person;
Person.id=people.length;
Person.name=name;
Person.age=age;
Person.height=height;
people.push(Person);
//people.push( Person(people.length, name, age, height) );
}
to me this seems more logical (could be completely wrong, but hey…I’m trying to learn!)
…it seems to work and push the array without fault.