
A Function to Compare DFREF Values

jjweimer
DFREF cdf, xdf cdf = GetDataFolderDFR() xdf = GetWavesDataFolderDFR(xwave) if (cmpDFR(cdf,xdf)==0) same two data folders else two different data folders endif
It would also be useful for cmpDFR to return the level of the first ABOVE the second, for example root: is two levels above root:test:mydata, so ...
DFREF cdf = root: DFREF xdf = root:test:mydata print cmpDFR(cdf, xdf) ==> 2 print cmpDFR(xdf, cdf) ==> -2
In the mean time, you can probably make do with something like this:
April 17, 2009 at 03:00 pm - Permalink
Thanks. I was not aware of DataFolderRefStatus().
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
April 19, 2009 at 07:28 pm - Permalink
GetDataFolder( mode, [dfr])
If the optional Data Folder dfr is present, it is used in place of the current data folder.
Given that, the EqualDFR user function above is simplified like so:
So, I think that rather than cluttering the function list, I'll just leave it as is.
April 22, 2009 at 09:20 am - Permalink
Sounds good. Thanks for the suggested code and the changes in Igor to support it!
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
April 22, 2009 at 11:37 am - Permalink
Update: In 6.2, I added two functions: WaveRefsEqual(w1,w2) and DataFolderRefsEqual(dfr1,dfr2).
April 2, 2010 at 07:41 am - Permalink