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: Easy question on print command
Topic Summary:
Created On: 2-Oct-2006 02:44
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.
Answer This question was answered by Pete Kowalski, on Monday, October 2, 2006 4:20 AM

Answer:
After finding some old notes I answered my own question.

The "" are needed to terminate the string.

Argh
 2-Oct-2006 02:44
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

Hi Everyone,

I haven't been a hard core DXL developer for some time so please excuse this stupid question here.

I have a module, and it has an attribute called "Status".

In the below simple, short program I am simply looping through all the objects in the module, and if I come across an object that has the single enemurated value of "Released" I want to print out the Absolute Number to the DXL window.

My question is why do I need the "" at the end of the print statement?

I dont remember ever having to do this.


Thanks,

quote:


Object o = current
string oStatus = o."Status"

for o in current Module do
{
if (oStatus == "Released")
{
print o."Absolute Number" ""
}
}



-------------------------
pete.kowalski(at)motorola.com
Report this to a Moderator Report this to a Moderator
 2-Oct-2006 04:20
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

Answer Answer
After finding some old notes I answered my own question.

The "" are needed to terminate the string.

Argh

-------------------------
pete.kowalski(at)motorola.com
Report this to a Moderator Report this to a Moderator
 3-Oct-2006 13:39
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Sorry to nit-pick, but strickly speaking the quotes are not required to "terminate" the string, they are in fact needed to cast the expression to a string before being passed to the print function.

The expression o."Object Text" is of type Attr__.
The expression o."Object Text" "" is of type string.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 3-Oct-2006 20:30
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

No issues at all.

Thanks for the additional information.

I just rehashing what I saw in a Telelogic manual, and you know the record on how "good" they document.

-------------------------
pete.kowalski(at)motorola.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.