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: forward reference not resolved
Topic Summary:
Created On: 5-Oct-2005 09:30
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.
 5-Oct-2005 09:30
User is offline View Users Profile Print this message


Thomas Fürer

Posts: 6
Joined: 16-Sep-2005

Hi! I'am writting on a DXL script where I need forward declarations. in the file protocolOperations.dxl I've some of these declerations: Code: void polyMorph(string&, Item, int); When I start the script in an open session of DOORS it works with out errors. When I start the script in the batched mode of DOORS (because this script is a socket server) I get the following error message: -R-E- DXL: forward reference not resolved which points to the following source (polyMorph...): Code: void treeWalk(string &s, Project itemRef, int lvl) { Item subItem addStartTag(s,"ProjectRM", name itemRef, lvl) for subItem in itemRef do { polyMorph(s, subItem, lvl+2) } addEndTag(s,"ProjectRM", lvl) } So why I cannot start the script with the passive DOORS (batched mode)? many thx for help Tom
Report this to a Moderator Report this to a Moderator
 23-Mar-2006 14:48
User is offline View Users Profile Print this message


Mattias Johansson

Posts: 14
Joined: 5-Jul-2004

I have a similar problem. I try to include an .inc file when DOORS is started (through the startup.dxl script). The .inc file contains forward references.. I get the same error.
/Mattias
Report this to a Moderator Report this to a Moderator
 28-Mar-2006 19:53
User is offline View Users Profile Print this message


Kevin James

Posts: 32
Joined: 12-Dec-2005

Thomas,

We've had the same problem here.  The solution is to wrap the entire DXL script that's going to be run in batch mode in braces.  Apparently the DXL interpreter does this automatically when the script is run through the client interface.  For whatever reason this seems to resolve the forward reference errors.

For example:

// batchcode.dxl
{
      // put entire file in here...
}

There is another thread related to this somewhere, but it provides the same solution I think.

Kevin
Report this to a Moderator Report this to a Moderator
 9-Mar-2008 02:31
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

I realize people that posted in this thread seem to be experiencing this issue only in batch mode. I am experiencing this in a regular dxl script execution mode. Any ideas on how I might debug this since the error seems to be stemming from a script that telelogic provided? Any input would be much appreciated. Thank you.

Regards,

Pranav Chandrasekhar
Report this to a Moderator Report this to a Moderator
 12-Mar-2008 14:50
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

What is the exact error.
If you show me the function name I might be able to help.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 12-Mar-2008 15:20
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Most usual error committed in forward declaration is using the wrong function signature. Following shows example of correct usage of signatrue for forward declaration.


//Proper forward declaration of a function
/* Notice that dxl lets function have a shortcut of haveing variable type declared once but the signature does not allow this shortcut
*/
string MyFunction(string,string,int,int)//correct signature of forward declaration

string MyFunction(string s, s2,int i,j)
{ return i " " s " " j" " s2
}

print MyFunction("s", "s2", 1,2)
Report this to a Moderator Report this to a Moderator
 12-Mar-2008 16:44
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

The specific error I get is as follows:

-R-E- DXL: <utils/doctools/itfui2.inc:119> forward reference not resolved

Thank you for responding to my post.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 13-Mar-2008 14:39
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

How are you using this include file?

Looking at the file I can see that there is a call to userExportCode(), but this function is not defined. You are expectd to supply that. See comments in the file.

You can see an example of the forward declaration and definition of the function in DOORSHOME/lib/dxl/standard/export/office/word.dxl.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 25-Apr-2008 22:29
User is offline View Users Profile Print this message


jason haury

Posts: 39
Joined: 20-Feb-2007

here's a quick clarification note for this post:

when you put your braces around the "entire code" this means EVERYTHING from the point after the first comment that starts your script (the standard is to have the first line of your script a single line comment (starts with "//") and then the next few lines are a block comment (contained in "/*" and "*/") with more details about what the script does, etc.).

For a while I thought the block comment was innocuous, but trial and error taught me that even it needed to be contained within the starting brace.

So to be more precise, the attached code is what your file should look like

Jason
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.