take waves from a 2-D matrix and assign each wave a name from a stringlist

What would be the correct syntax for extracting a string from a string list and then assign that string to a name of a wave?
I can never get the compile to pass, sigh...
Thank you thomas and A.G., I don't have Igor7 installed yet. I downloaded demo and see what the function is. Is there a way to see "inside" of functions contained in Igor?
mwpro wrote: What would be the correct syntax for extracting a string from a string list and then assign that string to a name of a wave?
I can never get the compile to pass, sigh...


It's not clear from your question whether your string list is a list of names of already existing waves or is a list of names to be used when creating new waves. Consequently, there are two possible solutions.

For both cases use
sName = StringFromList(index, listStr  [, listSepStr ])
to get a list item. I suggest you look up the StringFromList function in command help to get a better understanding of the syntax.

Then, for the first case, get a reference to the wave with
Wave wTemp = $sName 
.

For the second case, create the wave and get a reference to it with something like the following:
Make/O $sName 
Wave wTemp = $sName


Here's a snippet to demonstrate how the second case could be used:

Function Test()
	String sList = "Name1;Name2;Name3"
	String sName = ""
	Variable nIndex = 0
	Do
		sName = StringFromLIst(nIndex, sList, ";")
		if( StrLen( sName ) == 0 )
			break
		endif
		Make/O/N=5 $sName
		Wave wTemp = $sName
		print wTemp
		nIndex += 1
	While(1)
End


This example is fine for version 6.xx of Igor.
Hope this helps.