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: 'string' in call parameter
Topic Summary:
Created On: 14-Aug-2006 14:44
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.
 14-Aug-2006 14:44
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

In the attached code, notice the NameRestored1 line has 'string' in the call parameter to function GetRestoredName(). I was wondering if that may cause some problem, or what exactly is going on, and why that's not a syntax error?

- Louie
Report this to a Moderator Report this to a Moderator
 14-Aug-2006 16:10
User is offline View Users Profile Print this message


Paul Worrall

Posts: 87
Joined: 30-Sep-2003

It is a cast, but since NameMore is declared as a string variable anyway there is no ambiguity in your code and the cast is superfluous. It does however make a difference in the example below. In this case there are two GetRestoredName functions, one taking a string and the other taking an int; and NameMore is the name of two functions, one returning a string and one returning an int. The casts remove the ambiguity in the calls to GetRestoredName.
Report this to a Moderator Report this to a Moderator
 16-Aug-2006 00:36
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Thanks.

Maybe its the Amish in me, but I don't see the point of all these super-clever constructs: strongly supports the generation of write-only code, instead of the generation of understandable code.

- Louie
Report this to a Moderator Report this to a Moderator
 16-Aug-2006 07:30
User is offline View Users Profile Print this message


Michael Werner

Posts: 15
Joined: 29-May-2006

Oh Oh...
Function Overloading by Return type. You don't need to be Amish to dislike that

regards michael
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.