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: Comment line breaks IF/ELSE
Topic Summary:
Created On: 15-Sep-2003 18:24
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.
 15-Sep-2003 18:24
User is offline View Users Profile Print this message


Douglas Zawacki

Posts: 97
Joined: 14-Aug-2003

DOORS 5.2
If you put a comment line after the else in an if/else statement the comment line is considered to be the executable statement and the rest of the code is treated as a separate block of code. For example the following will print out "A == A" and "A # A"

if ( "A" == "A" )
{
print "A == A" "\n"
}
else
//This breaks the else
{
print "A # A" "\n"
}

Does this problem still exist in DOORS 7.0 ?
Report this to a Moderator Report this to a Moderator
 16-Sep-2003 13:28
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

This problem does not exist in DOORS 6.0.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 16-Sep-2003 16:42
User is offline View Users Profile Print this message


Alec Witham Crawford

Posts: 24
Joined: 2-Jul-2003

I don't see this behavior at all. But, if you put a hyphen at the end of the comment, it should fix your problem.
Report this to a Moderator Report this to a Moderator
 16-Sep-2003 17:48
User is offline View Users Profile Print this message


Douglas Zawacki

Posts: 97
Joined: 14-Aug-2003

Alec,
What version of DOORs are you using?
Report this to a Moderator Report this to a Moderator
 17-Sep-2003 12:55
User is offline View Users Profile Print this message


Alec Witham Crawford

Posts: 24
Joined: 2-Jul-2003

5.2 with the patch. Build 52400.
Report this to a Moderator Report this to a Moderator
 19-Sep-2003 22:09
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Strange. I could have SWORN I had routinely experienced this issue, but when I run your code on both v5 and v6, the else still does NOT execute. I seem to be no longer having this issue. This leads me to suspect it has something to do with environment.

Anyway, as Crawford pointed out try adding a "-" dash to the end of your comment, thus making it a "continuation" statement. Or just be more disciplined structured with your braces {}.

- Louie
Report this to a Moderator Report this to a Moderator
 22-Sep-2003 20:51
User is offline View Users Profile Print this message


Douglas Zawacki

Posts: 97
Joined: 14-Aug-2003

DOORS 5.2
Build 52301

This version seems to display the IF/ELSE problem.

I don't see how the interpretor would seem to care about "Environment". I would suspect the build version before environment.

Thanks for the comments about applying the "-" (dash). I was aware of it but I just wanted to point out this erroneous behaviour to anyone who may have been experiencing the same.
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.