Uniface on GitHub
Product (releases and patches)
Reported Issues (old)
Fixes and Updates
As we all know, one can define precompiler constants manly in the define-trigger but also elsehere in code.Now I thougt about a tricky "programming"Undefine (or define empty) a constant as an flag in define-triggerElsewhere in code redfine this constant with a value like "1"At the end of compiling catch this constant flag and do somthing with the information
DEFINE-trigger #define CC_FLAG
e.g. LPMX-trigger #define CC_FLAG 1
last-trigger? #if ('<CC_FLAG>'='1') #warning at least on trigger fires FLAG #endif putitem/id $A_INSTANCE_INFO$,"FLAG","<CC_FLAG>"
Actualy I don't know a trigger which is always compile at least.And "worse", do such a trigger hold proccode?
Background (an example)I do compile instance-infos into a component local variable which can be read at runtime.In ths variable there are such things as timestamps or a flag, that a programm is declared "obsolete"Now I want to catch "dubious" parts of the program. A programm should set a #define flags at the point where code is dubious.This information should then go into the component local variable at the end of proccode
That are all onyl example of this kind of pre-compile programming.
Any idea if such trigger exists Ingo
Okay, I can define an include with set the information.But this looks dirty as this are not macros with parameters #define debuios = WhatsGoingOnHere #include SetDubious
With macros this looks like #macro SetDubious(WhatsGoingOnHere)Where the dine looks like: #definemacro SetDubious(a_string) putitem/id $A_INSTANCE_INFO$,"DUBIOS","<a_string>" #enddefinemacro
I don't know what you want to do.
But if you only want to know where you have used "#define",
then you can use "Global Proc Search" with "%#define".
The result will look like this :
Component - G_LISTBOX - Defines - 1 - #define MYDEF1
Component - G_LISTBOX - Local Proc Modules - 25 - #define MYDEF1 = 7
Component Entity - DUMMY@DUMMY@G_LISTBOX - <Menu> - 1 - #define MYDEF1 = 3
Component Field - F1@DUMMY@DUMMY@G_LISTBOX - <Detail> - 1 - #define MYDEF1 = 2
Component Field - F2@DUMMY@DUMMY@G_LISTBOX - Defines - 1 - #define MYDEF1 = 1
You can see exactly where it is defined.
© 2020 Uniface Privacy & Cookies | Privacy Statement | Legal