Is there a term for "​​Fcn"?

조회 수: 2 (최근 30일)
per isakson
per isakson 2017년 1월 25일
댓글: per isakson 2017년 1월 27일
Please give me a term for the text string, which is used to invoke a function. Before package folders were introduced function name or when context allowed name were good unambiguous terms.
For example, consider this package function: +mypack\+mysubpack\myFcn.m. The function name is myFcn, but to invoke the function mypack.mysubpack.myFcn is required. I cannot think of a better term than full function name.
In the documentation I didn't find anything better than Packages Create Namespaces
Referencing Package Members from Outside the Package
Functions, classes, and other packages contained in a package are scoped to that
package. To reference any of the package members, prefix the package name to the
member name, separated by a dot.

채택된 답변

Walter Roberson
Walter Roberson 2017년 1월 27일
I would probably go by analogy with DNS, and refer to "function name", "qualified function name", and "fully qualified function name"
  댓글 수: 2
Guillaume 2017년 1월 27일
I was going to offer the same: 'qualified function name'
per isakson
per isakson 2017년 1월 27일
Of course!
And it is consistent with Java, see Chapter 6. Names

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Chirag Parekh
Chirag Parekh 2017년 1월 27일
편집: Chirag Parekh 2017년 1월 27일
You can import the package in your script or function from where you want to call +mypack\+mysubpack\myFcn.m
Suppose you want to call myFcn() from script myScript.m, import mypack.mysubpack.* in myScript.m and then you can call myFcn() without the package specifiers in the script. You can also import packages in functions.
import mypack.mysubpack.*
In case you are using folders(mypack/mysubpack) and not packages(+mypack/+mysubpack), you should be able to call myFcn() without the full folder specifier as long as it is on MATLAB path.
  댓글 수: 1
Walter Roberson
Walter Roberson 2017년 1월 27일
Yes but the question was about what descriptive term to use, not about what could be done with them.

댓글을 달려면 로그인하십시오.


Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by