You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an instance I is defined in a module M, the name of the instance is M_I. However, the code generation is not entirely consistent:
In the dictionary, the name becomes I instead of M_I. This makes the name shorter, but it can create ambiguity because it deletes the module prefix. E.g., M_I and N_I have the same name I in the dictionary. We should be consistent and use M_I in this case; a user who wants the unqualified name I can define the instance I outside of any module scope.
In the generated C++, the name becomes I inside the namespace M and M_I outside the namespace M. This makes it hard to write initialization code that works in all cases. We should either (1) use M_I consistently in all cases or (2) use a C++ namespace qualifier M::I instead of M_I.
We can fix (1) as we develop the new JSON dictionary. We can fix (2) by updating fpp-to-cpp.
The text was updated successfully, but these errors were encountered:
When an instance I is defined in a module M, the name of the instance is M_I. However, the code generation is not entirely consistent:
We can fix (1) as we develop the new JSON dictionary. We can fix (2) by updating fpp-to-cpp.
The text was updated successfully, but these errors were encountered: