Structure element as path input to NewPath operation
jtigor
Struct structJTG_MFLa s
NewPath /O/Q/Z spLoadNoteFunc, s.sPathToFiles
NewPath /O/Q/Z spLoadNoteFunc, s.sPathToFiles
The error highlights the period between "s" and "sPathToFiles".
The structure and sPathToFiles have previously been defined as:
Structure structJTG_MFLa
String sFileNameList //semicolon separated list of selected files
String sPathToFiles //colon separated path to disk files
Variable vKillWaves //1 == kill waves, otherwise don't; message to file loader to kill waves when done
EndStructure
String sFileNameList //semicolon separated list of selected files
String sPathToFiles //colon separated path to disk files
Variable vKillWaves //1 == kill waves, otherwise don't; message to file loader to kill waves when done
EndStructure
This can be worked around with...
String sPathToFiles = s.sPathToFiles
//create new symbolic path
NewPath /O/Q/Z spLoadNoteFunc, sPathToFiles
//create new symbolic path
NewPath /O/Q/Z spLoadNoteFunc, sPathToFiles
but the error from the use of a structure element is unexpected (for me, at least). Am I missing something?
Thanks,
Jeff
The Igor compiler often has difficulties compiling operations that expect string parameters when you use a string element of a structure. By concatenating an empty string to the beginning of the structure string field, you allow the compiler to recognize that you are in fact providing a string.
March 20, 2012 at 08:15 am - Permalink
March 20, 2012 at 08:27 am - Permalink