![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: DXL parsing Topic Summary: Created On: 24-Jan-2004 14:13 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Thanks, Roger! Your theory makes sense, and explains nicely the actual symptoms I experienced in the broader context of my code. I would have saved time had I had the brains to think like a DXL interpretor during my debugging. I'll leave to the core developers of the DXL interpretor to explain why a single parameter in a function call gets concatenated in this way (with or without parentheses around that parameter) when the last parameter in a multiple parameter function call doesn't...:-) ------------------------------------------- Stian Aase, Computas AS, Norway | |
![]() |
|
I find the DXL doc a little sparse on parsing, so can somebody state the parsing rule that causes this DXL...
//start string testReturnString(string str) { return "*" str "*" } print testReturnString("string") "\n" //end ...to print the following: *string * It seems concatenation has higher presedence than the end bracket in the call to testReturnString(). It would be great if the doc more clearly states exactly how DXL is parsed (and hence in this case why wrapping the call to testReturnString in parantheses, e.g. (testReturnString()), produces the intended result...:-) ------------------------------------------- Stian Aase, Computas AS, Norway |
|
![]() |
|
![]() |
|
Thanks, Roger!
Your theory makes sense, and explains nicely the actual symptoms I experienced in the broader context of my code. I would have saved time had I had the brains to think like a DXL interpretor during my debugging. I'll leave to the core developers of the DXL interpretor to explain why a single parameter in a function call gets concatenated in this way (with or without parentheses around that parameter) when the last parameter in a multiple parameter function call doesn't...:-) ------------------------------------------- Stian Aase, Computas AS, Norway |
|
![]() |
|
![]() |
|
Well well well. That has just about got to be the stupidist "feature" I've ever seen. The other was a compiler that tried to figure out what you "must" have meant, translated it that way, and then run the program anyway.
I guess it only matters when the function expects a single string parameter. That explains why I have to routinely: [A] get the value of the function call, THEN print it: Results = testReturnString("string") print Results "\n" Insure that all function calls within print statements are themselves bracketed: print (testReturnString("string")) "\n" Curious, however, is that I never seem to have this problem when I'm not calling print. Maybe I've NEVER before done something like this: string Results = testReturnString("string") "\n" - Louie |
|
![]() |
|
![]() |
|
Got no problem with allowing "null next sibling o". But it should NOT automatically remove parenthesis when they exist, even for functions with one parameter.
- Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
DXL parsing
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.