TAGMARRAY() Short: ------ TAGMARRAY() Tag elements in muti-dimensioned array Returns: -------- <aTagged> => an array of numbers representing the tagged elements Syntax: ------- TAGMARRAY(aArray,[cTitle],[cMark],[aTags],[aHeads]) Description: ------------ A popup which allows tagging/untagging of elements in <aArray>, which is a multi-dimmed array of the format {array(n),array(n)} such as is returned by DIRECTORY() or DBSTRUCT(). SPACE = Tag/Untag F10 = Done ESC = Abort ALT-A = Tag All ALT-U = Untag All ALT-S = Swap Tagged/untagged The return value <aTagged> is an array of integer values representing the offsets into the original array <aArray> which were tagged. [cTitle] is a string to be used as the box title [cMark] is the tag character. Default is chr(251) - checkmark [aTags] is an array of logicals the same length as <aArray>. This allows pre-tagging. You may also use this array on return from the function. The (.T.) elements correspond to the tagged elements in <aArray>. [aHeads] is an array for the column titles for each subarray element in <aArray>, and needs to be the same length as a subarray of <aArray> Examples: --------- aDir := directory() aCols := {"File","Size","Date","Time","Attribute"} aCopy := tagmarray(aDir,"Select Files for copying",nil,nil,aCols) for i = 1 to len(aCopy) COPY FILE (aDir[aCopy[i],1 ]) TO (cDestination) next Notes: ------- Coded by Matthew Maier - thanks. Source: ------- S_TAGAM.PRG