void PutInit(std::ostream &os, const MaybeExpr &init) {
if (init) {
- os << '=' << init;
+ init->AsFortran(os << '=');
}
}
void PutInit(std::ostream &os, const MaybeIntExpr &init) {
if (init) {
- os << '=' << init;
+ init->AsFortran(os << '=');
}
}
} else if (x.isDeferred()) {
os << ':';
} else {
- os << x.GetExplicit();
+ x.GetExplicit()->AsFortran(os);
}
}
attrs.set(Attr::PUBLIC, false); // no need to write PUBLIC
attrs.set(Attr::EXTERNAL, false); // no need to write EXTERNAL
if (bindName) {
- os << before << "bind(c, name=" << bindName << ')' << after;
+ bindName->AsFortran(os << before << "bind(c, name=") << ')' << after;
attrs.set(Attr::BIND_C, false);
}
for (std::size_t i{0}; i < Attr_enumSize; ++i) {