Tblgen and computed expressions

Martin hi.

It seems like you have in fact understood the offered solution, and its disadvantages.
The thing is, that as far as I understand Tblgen (and I think I do :slight_smile: ),
The idea behind it is that records only have state (i.e., fields), and not a behavior (i.e., methods) - so dynamic evaluation can only be achieved by built-in functions.
(e.g., !if(), !foreach() etc...).

Maybe you can try using one for the solution. If you can't find that fits you, please let me know - maybe we can define a new function that will meet your needs,
And maybe also those of the silent crowed.

Thx, Elior

Thanks again Elior,

Yes, I tried using '!if', etc. but I just get type mismatches for the
initializer (int) - probably something daft I'm doing :frowning:


Feel free to send whatever code you can, I'll be glad to have a look.