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: Casting string datatypes
Topic Summary:
Created On: 20-Sep-2002 15:57
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.
 20-Sep-2002 15:57
User is offline View Users Profile Print this message


Sean Aitken

Posts: 4
Joined: 12-Sep-2002



Edited: 20-Sep-2002 at 16:01 by Sean Aitken
Report this to a Moderator Report this to a Moderator
 20-Sep-2002 18:00
User is offline View Users Profile Print this message


Jeremy Eble

Posts: 30
Joined: 20-Sep-2002

This looks similar to a question answered on the 12th by Tony Goodman. You can refer to that posting for the details, but try using




-------------------------
Jeremy Eble
Software Engineer
Teragon Consulting LLC
jeremy.r.eble@lmco.com

Edited: 20-Sep-2002 at 18:00 by Jeremy Eble
Report this to a Moderator Report this to a Moderator
 20-Sep-2002 18:50
User is offline View Users Profile Print this message


Sean Aitken

Posts: 4
Joined: 12-Sep-2002

I understand that appending the empty string ("") is a way to cast, but can anyone on this board, or Telelogic provide me with how I can formally use a 'cast' to get a string? It seems like a bug in the language if thats the case.. or a poorly documented solution to what seems to be a common task. And if so, I would like to see that admitted (with a slated fix date) as opposed to a 'workaround'. Thank you for the reference though, it will suffice for this problem. I would like to see an explination as to why casting an attribute does not work. It's frustrating to follow instructions only to be burdened by a language limitation. (i.e. Casting does NOT work against attributes)

Thanks for the tip,

Sean
Report this to a Moderator Report this to a Moderator
 23-Sep-2002 14:04
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

If you want the value returned to be cast without appending the empty string you can use

probeAttr_(obj, "Object Text")


-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 24-Sep-2002 17:11
User is offline View Users Profile Print this message


r g

Posts: 24
Joined: 20-May-2002

Hi Sean,

Well, allow me to put my two cents into this discussion. I have requested similar information regarding "casts" and DXL and frankly the compiler is built to work with only some of the variable types. So, since there is no formal documentation on which types can be cast and which can't we have reverted to using explicit declarations before doing a comparison (If...Then)

In your example. Declare an integer right before the comparison that is the length of the attribute you wish to compare.

<SEE below 1 example code>

The significant drawbacks to doing this is the compiler eats up resources like cookie monster at a Chips' A'Hoy Factory. The benefit is your data can not be corrupted. Something that the DXL documentation fails to mention with their inheritence section.

I agree with you, it certainly is a problem, and should be documented in a more complete fashion instead of the cut/paste snippets from the example code at the end of each section. How about a couple of examples? Wouldn't that be grand.

In regard to ---> probeAttr_(obj, "Object Text")

I would like to warn others of the use of the mysterious "_" functions. These are top level functions that remain running while the DXL server is active. If something goes wrong in your code; watch out since now there is a rogue process running at the top level of DOORS possibly eating up resources, or even worse...corrupting your data if the same functions/modules are used again. Good luck.


-------------------------
rg.


Edited: 24-Sep-2002 at 17:13 by r g
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.