CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sun Oct 20, 2019 3:14 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Dec 16, 2013 9:33 am 
Offline

Joined: Wed Jul 25, 2012 1:52 pm
Posts: 2
Hello everybody,

I have a few problems with following code (see screenshots):

- First problem: I define a new symbol replacement directive, but the compiler doesn't recognize the defined symbol "REPLACE_ME" after the pre-compiler has build it.
And he definitly pre-compiles this piece of code since I can see in the output that debug mode is enabled !
Does anybody know how to use the {define identifier string} macro ?

- Further more I want to write my own ASSERT(x) macro which is only defined during debug mode, and wich takes 1 or 2 parameters for validation.
Second problem: you can't define DEBUG outside PLC_PRG. I found this issue back in the help and I think this is a major limitation! How would it be possible to use my ASSERT(x) macro in other libraries??
Third problem: It's not possible to use the symbol " {error '...'} " inside a {define identifier}. How can I display an error in the output?
Fourth problem: in C++ you can convert x to a string using #, but how is this done in CoDeSys?
Fifth problem: how can you define the identifier as a function, which takes 1 or more parameters?

Thanks for all help and comments !


You do not have the required permissions to view the files attached to this post.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited