Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: DXL conditional compilation
Topic Summary:
Created On: 22-Sep-2006 10:26
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 22-Sep-2006 10:26
User is offline View Users Profile Print this message


Darius Dolnik

Posts: 16
Joined: 13-Jul-2004

Hi all

does anybody have any idea about using conditional compilation (C-like) with DXL? I want to execute some code for test only but keep it within the dxl-module after the test was finished.

Regards
Darius
Report this to a Moderator Report this to a Moderator
 22-Sep-2006 12:09
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Can't do it I am afraid.

#includes are included before the file is interpreted and there is no #ifdef stuff.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 22-Sep-2006 12:25
User is offline View Users Profile Print this message


Paul Tiplady

Posts: 176
Joined: 28-Oct-2003

Since DXL is interpreted, the question is irrelevant.

Your best bet is to conditionally execute the code, based on the value of a bool defined somewhere. For development, you set the bool (call it 'development', for instance) to true, for release you set it to false. Your 'conditional code' then gets surrounded by 'if (development) { ... }', and you have a mechanism that does what you want, just not quite how you wanted it...

Paul.

-------------------------


Paul dot Tiplady at TRW dot com
TRW Automotive
Report this to a Moderator Report this to a Moderator
 22-Sep-2006 12:51
User is offline View Users Profile Print this message


Darius Dolnik

Posts: 16
Joined: 13-Jul-2004

Hi Tony, hi Paul

thanx for ur answers. I also thought about executing conditional code using a bool value within the 'if' statement but I hoped that would be a nicer way to do this like setting XFLAGS or whatever.

Does something like C++'s try/throw/catch exist for DXL or have u ever thought how to implement it? In my opinion it could be a usefull feature for DOORS programmers.

Regards
Darius
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.