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

Incorrect calculation of line with error in st code #2

Open
bullitmaster opened this issue Aug 16, 2022 · 2 comments
Open

Incorrect calculation of line with error in st code #2

bullitmaster opened this issue Aug 16, 2022 · 2 comments

Comments

@bullitmaster
Copy link

The error is on line 23, and matiec outputs what is on line 26:
error_line_23_26 := d;

matiec output:
`build/plc.st:26-24..26-24: error: Ambiguous enumerate value or Variable not declared in this scope.

example plc.st
Please, rename plc.txt to plc.st

Run:
<path to matiec>/matiec/iec2c -f -l -p -I "<path to matiec>/matiec/lib" -T "<path to project>/prj/build" "<path to project>/prj/build/plc.st"

@bullitmaster
Copy link
Author

bullitmaster commented Aug 16, 2022

I think it's all about the curly braces!

Maybe because of this line?)

@bortech
Copy link

bortech commented Jan 3, 2023

Yes, its about curly braces. You cannot use multiline pragmas.
Wrap every line of C code with {{ }} and it'll be alright
{{ uint8_t test_func(uint8_t a); }}
{{ SetFbVar(OUT, test_func(GetFbVar(IN))); }}

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

No branches or pull requests

2 participants