Applies To:
  • CitectSCADA
  • CitectHMI

Summary:
I get a compiler error “Cannot use an array inside function” after defining an array in my Cicode and compiling my project. How do I fix this?
 

Solution:
You cannot declare an array local to a function. They can only be declared as Module (declared at the top of the cicode file – MODULE prefix optional) or Global (declared at the top of the cicode file and prefixed with the keyword GLOBAL). To declare arrays correctly you need to define your array before the function.
 

Keywords:
Cicode Array  

Attachments