Separate>list,delimiter,returnvar[,variable_type]

 

Separate takes a list, a delimiter and returns the elements of the list. The command returns a number of variables, one for each list element, each with the suffix "_n" where n is the index of the element in the list.  The variable names are determined by the name given in returnvar.  e.g. returnvar_1, returnvar_2, etc.  Also returned is the number of elements in the list, in returnvar_count.

 

The optional parameter variable_type can be used to set the variable type for each element. E.g. "string". This is useful when performing comparisons in complex expressions as it will force string comparison and prevent type needing to be inferred.

 

Abbreviation : SEP

 

Example

 

GetFileList>c:\temp\*.*,files

Separate>files,;,file_names

MessageModal>Num Files: %file_names_count%

If>file_names_count=0,end

Let>k=0

Repeat>k

  Let>k=k+1

  Message>file_names_%k%

Until>k,file_names_count

Label>end