当前位置:网站首页>Nested assignment of D

Nested assignment of D

2022-06-22 14:26:00 fqbqrr

original text

theFirstName[theFirstIndex].theSecondName[theSecondIndex].thirdName[theThirdIndex]=x;
// You want to rewrite it as follows :
alias shortName = theFirstName[theFirstIndex].theSecondName[theSecondIndex].thirdName[theThirdIndex];
shortName = x;

You can use it. The pointer . Even in dip1000 Also working in . Just remember to use *t To dereference , Otherwise not compile .
It's fine too :

ref shortName() {
    
    return theFirstName[theFirstIndex].theSecondName[theSecondIndex].thirdName[theThirdIndex];
  }

shortName = x;
原网站

版权声明
本文为[fqbqrr]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221307506662.html