Dear team,
I’m a heavy user of templates and declarative attributes to make the output as easily readable as possible, and 101 Editor already offers a lot of features regarding that. Since the tree navigation can sometimes make getting to the essence a bit tricky, I find myself using the <comment>
attribute a lot to extract the most useful bits from a struct, much like Debuggers do in their tooltips for variables. I came across two questions though:
- Is there a single place to define a way a struct is displayed in a comment? For now, I’m having a lot of repetition by placing the comment on each use of the struct, e.g.
struct String
{
int length;
char content[length];
};
String s1 <comment=Str("Length = %i", this.length)>;
String s2 <comment=Str("Length = %i", this.length)>;
String s3 <comment=Str("Length = %i", this.length)>;
Placing the on the struct itself would seem like a logical place, but 101 treats it as a syntax error if I do so.
- Is there a way to display a string declared as
char[]
inside a comment? The following - continued from above example - does not seem to work (“content is not a member of the struct”):
String s1 <comment=Str("Text = %s", this.content)>;
In case this is not currently possible, I’d be happy if you considered it a suggestion for further enhancement of an already very good tool.
Thanks,
Michael