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: How to use ModName_
Topic Summary:
Created On: 28-Feb-2007 19:13
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.
 28-Feb-2007 19:13
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

I am trying to use the ModName_ to get a reference to a module. I tried the following code:

ModName_mRef = module("/Sandbox/Krishna/Test_Module_1")
if (null mRef) print "Yes:
else print "No"

I get the error 'incorrect arguments for  if '. I tried '_mRef' , 'module mRef' in place of 'mRef' but the result is the same. What is the correct use for getting a reference to a module (open or closed) by using the ModName_. We are using version 7.1.
Thanks for any help

- Krishna
Report this to a Moderator Report this to a Moderator
 28-Feb-2007 19:40
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Try something like :

Module m = current
ModName_ modRef= module(fullName( m))
Report this to a Moderator Report this to a Moderator
 28-Feb-2007 20:06
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

It does not work. I opened a module and made it current. I am still getting the same error.

- Krishna
Report this to a Moderator Report this to a Moderator
 28-Feb-2007 20:13
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

If what you have in your original positing -- it won't work because "Yes: needs an end quote.
Report this to a Moderator Report this to a Moderator
 1-Mar-2007 10:53
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

If you pasted your actual code into the forum then the problem is that you do not have a space between ModName_ and mRef.
If you have autodeclare turned on this will not be picked up by the interpreter.
Instead it will define a variable called "ModName_mRef" of type ModName_.
When you try to test mRef, the variable is undefined.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 1-Mar-2007 16:42
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Thanks for the reply, Tony. In fact I was entering the variable name soon after the underscore and that was the reason for the error.

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