Yes
The getter function that Solidity generates uses the order listed in the struct. Solidity would generate a function of the following form:
function prices() constant returns (uint sell_price, uint target_price, uint penalty_price) {
sell_price = prices.sell_price;
target_price = prices.target_price;
penalty_price = prices.penalty_price;
}
Here's the ABI and see that the outputs
have a specific order:
[
{
"constant": true,
"inputs": [],
"name": "prices",
"outputs": [
{
"name": "sell_price",
"type": "uint256"
},
{
"name": "target_price",
"type": "uint256"
},
{
"name": "penalty_price",
"type": "uint256"
}
],
"payable": false,
"type": "function"
}
]
Additionally, a more complex example of a getter from
http://solidity.readthedocs.io/en/develop/contracts.html#getter-functions
contract Complex {
struct Data {
uint a;
bytes3 b;
mapping (uint => uint) map;
}
mapping (uint => mapping(bool => Data[])) public data;
}
It will generate a function of the following form:
function data(uint arg1, bool arg2, uint arg3) returns (uint a, bytes3 b) {
a = data[arg1][arg2][arg3].a;
b = data[arg1][arg2][arg3].b;
}
Note that the mapping in the struct is omitted because there is no good way to provide the key for the mapping.