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: Conditional #includes
Topic Summary:
Created On: 25-Mar-2004 10:47
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.
 25-Mar-2004 10:47
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I wanted to implement conditional #includes, so I tried the following and was pleasantly surprised to see that it works.



-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 25-Mar-2004 14:29
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Put this function in Hello.Dxl:
void AckGreeting()
{ ack("Hello")
}

Put this function in Goodbye.dxl:
void AckGreeting()
{ ack("Goodbye")
}

Add this to the bottom of your code:
AckGreeting().

Notice you get a DXL error because function "AckGreeting" isn't defined. Its not defined because it was defined within a local scope, either the IF or the ELSE scope above.

- Louie
Report this to a Moderator Report this to a Moderator
 25-Mar-2004 15:26
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

oops! foot back in mouth...


-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 26-Mar-2004 13:47
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Telelogic says that since DXL is interpreted, there are no real conditional includes. I've solved this problem with multiple "addins" command locations (it looks for the first include in the list), and deploying different version of the same named include file. Function "fStripRT" that extracts the raw text from a rich text string is fundamentally different from v5 to v6 and I have two such functions: v5 uses "for <RichText> in InText" and v6 uses "for <RichTextParagraph> in InText". The RichTextParagraph stuff will NOT interpret in v5 so I cannot bypass it with a "if (ThisIsv5DOORS)" statement.

The problem with this approach is that I have to be carefull when deploying.

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.