![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: 'string' in call parameter Topic Summary: Created On: 14-Aug-2006 14:44 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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.
|
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
Oh Oh...
Function Overloading by Return type. You don't need to be Amish to dislike that ![]() regards michael |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
'string' in call parameter
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.