PDA

View Full Version : #ifcompar - are those nested?



NewsArchive
01-21-2012, 06:53 AM
Friedrich,

lets say I have several compiler variables, like [CUSTOMER], [COUNTRY] and
[VERSIONTYPE] .

#ifcompvar [CUSTOMER] Equals "Smith"
#ifcompvar [COUNTRY] Equals "Germany"
#ifcompvar [VERSIONTYPE] Equals "Complete"

#copy file "[OUTPUTDIR]\[EXENAME]" to "F:\Smith\Germany\Complete"

#else

#copy file "[OUTPUTDIR]\[EXENAME]" to "F:\Smith\Germany\Update"

#end
#end
#end

! ..............

#ifcompvar [CUSTOMER] Equals "Miller"
#ifcompvar [COUNTRY] Equals "Germany"
#ifcompvar [VERSIONTYPE] Equals "Complete"

#copy file "[OUTPUTDIR]\[EXENAME]" to "F:\Miller\Germany\Complete"

#else

#copy file "[OUTPUTDIR]\[EXENAME]" to "F:\Miller\Germany\Update"

#end
#end
#end

! ..............

When I now compile and select "Smith", "Germany" and "Complete", then the
Install.EXE will be copied / moved to BOTH

"F:\Smith\Germany\Complete\Install.EXE"
"F:\Miller\Germany\Complete\Install.EXE"

at the same time and vice versa. If 'move' is checked, I get an error
'file not found'.

IOW the Smith-EXE is in the Smith _and_ the Miller sub-folder, later then,
when compiling Miller, it gets copied into the Smith folder also. Both are
identical.

This leads me to the assumption that these #ifcompar are not nested.

In the Compiler Output the "Processing post compilation tasks..." the line
"Copying..." appears twice (or an error when Move is checked)

What makes me wonder is that in the #ifcompvar branches I have some other
directives to stand, which are processed correctly. So nesting works so
far, but not when I added that new condition.


There is, of course, also a good chance that I am wrong...


I hope my babbling was somehow understandable.

Thanks for your patience!



--
Wolfgang Orth

www.odata.de
www.kik-service.de

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It's five o'clock somewhere.....




Written with Operas News-/ Mailclient: http://www.opera.com/mail/

NewsArchive
01-21-2012, 06:53 AM
Hi Wolfgang,

I have to check the source code and will get back to you...

Friedrich

NewsArchive
01-21-2012, 06:54 AM
There is definitely something going wrong. Item in review.

Friedrich

NewsArchive
01-22-2012, 02:58 AM
Wolfgang,

>
> There is, of course, also a good chance that I am wrong...
>

I think we have fixed it. It was caused by a bug in the preprocessor
engine. Thank you for bringing this to my attention.

Friedrich

NewsArchive
01-22-2012, 02:58 AM
FIX : (sync from SB8) [SB#201211] IDE: Possible nested #ifcompvar
preprocessor issue.

FIX : (sync from SB8) [SB#201212] IDE: Possible nested #ifconst
preprocessor issue.

FIX : (sync from SB8) [SB#201213] IDE: Possible nested #ifdef
preprocessor issue.

FIX : (sync from SB8) [SB#201214] IDE: Possible nested #iffile
preprocessor issue.


--
Friedrich

NewsArchive
01-22-2012, 02:59 AM
>I think we have fixed it.

what an incredible speed! On a Saturday!

Thanks a lot for your effort, Friedrich.

Your product and your support is outstanding!

You can quote me.

Wolfgang Orth