Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace __ with :: in full type name of struct #192

Closed

Conversation

MandKastner
Copy link

No description provided.

if (paValue[i] == '_' && paValue[i-1] == '_') {
paValue[i] = ':';
paValue[i-1] = ':';
i++;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this i++ really needed? I understand it is a bit feaster but harder to read.

@mx990
Copy link
Member

mx990 commented Jul 25, 2024

I don't quite understand why we are making these replacements on FORTE, when we do the opposite replacements in the IDE? Should we not rather stick to using __ on FORTE for both management commands and monitoring values?

@azoitl
Copy link
Contributor

azoitl commented Jul 25, 2024

I don't quite understand why we are making these replacements on FORTE, when we do the opposite replacements in the IDE? Should we not rather stick to using __ on FORTE for both management commands and monitoring values?

Our philosphy so far was that 4diac FORTE on the interface always uses in its literals correct IEC 61131-3 syntax and hide implementation details. Did we change that for packages?

@mx990
Copy link
Member

mx990 commented Jul 25, 2024

Yes, until now, we used the mangled names (with __) on FORTE (e.g. when creating FBs, specifying structs, etc.) and did all the replacements in the IDE, see also ForteTypeNameCreator. CIEC_ANY_VARIANT::fromString also does not perform any replacements and thus expects the type to use __.

@MandKastner MandKastner closed this Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants