compiling code under condition

Maurizio
2009-08-31
2009-09-17
  • Maurizio - 2009-08-31

    Hi All,

    Someone can help me abaut undestand if it is possible to write code in codesys 3 that can be compiled under condition?

    Be care not the property exclude by compilation of an object but lyke in c with the opertor define and so on. The idea is generate differents compilation codes from one project when should be possible to have or not some codes.

    Thanks

     
  • spfeif - 2009-09-17

    I think you are wondering if there is something like pre-processor calls like #ifdef? No there is nothing that I am aware of. Your best bet is to set a bit and either execute the code or not.

     
  • Maurizio - 2009-09-17

    If I use bits with if istruction I must manually exclude code from compilation.

    I think the solution could be istruction pragma but I haven't undestood haw use it.

    Someone have experiences about?

     

Log in to post a comment.