Collections
Using stype variables in arrays and maps
suint256[] a; // stype as value
function f(suint256 idx) {
a[idx] // stype as key
// ...
}
// ==========
mapping(saddress => suint256) m; // stype as key and value
function d(suint256 k) {
m[k]
}sbool b = a[idx] < 10;
suint256 s = m[k] + 10;a[idx] *= 3;
m[k] += a[idx];
stype as the key and value to a collection shields which element you're using.Last updated

