|
From: | kamaraju kusumanchi |
Subject: | Re: same function name in two files |
Date: | Sun, 15 Jun 2014 20:38:11 -0400 |
I assume fileA.m and fileB.m are scripts and not functions?
On Jun 15, 2014, at 8:06 PM, kamaraju kusumanchi <address@hidden> wrote:
> Let's say I have two scripts (fileA.m, fileB.m) with the following set of functions.
>
> fileA.m
> foo()
> funcA1()
> funcA2()
>
> fileB.m
> foo()
> funcB1()
> funcB2()
>
> The implementation of foo() in both files is completely different. I have no write permissions to edit fileA.m, fileB.m
>
> A third script (fileC.m) uses all the six functions. I want to call both foo() implementations at different points in the code. Is there any way to achieve that? For example, is there anything like fileA.foo() , fileB.foo() to distinguish between the two?
>
Then, first run fileA and when you use foo() it corresponds to the implementation in fileA.
fileA
foo
To use the version if fileB, first fun fileB
fileA
foo
[Prev in Thread] | Current Thread | [Next in Thread] |