iSorp / macro-executor

Fanuc macro executor language
MIT License
19 stars 9 forks source link

error message "assignment on constant" without brackets #6

Closed Kellermeister1976 closed 4 years ago

Kellermeister1976 commented 4 years ago

pcode definition: @CYCCALL$G004 17052

assignment in src code:

CYCCALL$G004 = 1

this assignment shows error "assignment on a constant". when i programm "#[CYCCALL$G004] = 1" it works.

it is possible to support also "#CYCCALL$G004 = 1" (without brackets) ?

we also used a indexed call of a value like this:

COR$TOOL_XF1<[#SC$APLA-1]*CONST$COR_TOOL_LENGTH> = 3;

we also need this syntax very intensively in our project.

we use this syntax without brackets over the whole big project. an adaptation of the syntax is unfortunately not easy to implement.

i would be very happy if this adaptation could be implemented.

thanks a lot for this great plugin

iSorp commented 4 years ago

The easiest way to achieve your needs is to change the lint rule assignmentConstant in your settings.

"macro.lint": {
    "rules": {
        "assignmentConstant": "ignore"
    }
}
Kellermeister1976 commented 4 years ago

I have tested it and it works. This solution fits for me. thank you very much for the fast answer. the support is great!!!