![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Casting string datatypes Topic Summary: Created On: 20-Sep-2002 15:57 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Edited: 20-Sep-2002 at 16:01 by Sean Aitken |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Casting string datatypes
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.