![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Comment line breaks IF/ELSE Topic Summary: Created On: 15-Sep-2003 18:24 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 ? |
|
![]() |
|
![]() |
|
This problem does not exist in DOORS 6.0.
------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
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.
|
|
![]() |
|
![]() |
|
Alec,
What version of DOORs are you using? |
|
![]() |
|
![]() |
|
5.2 with the patch. Build 52400.
|
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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. |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Comment line breaks IF/ELSE
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.