join columns

Alain Farmer alain_farmer at
Thu Aug 28 21:20:47 CEST 2014

on insertAsColumn colNumber, dataToInsert, intoThisTable
    if the number of lines of dataToInsert is not the number of lines of intoThisTable
    then die "Error: Lists have different lengths."
    set the itemdel to tab
    repeat for each line x in dataToInsert
        get line x of dataToInsert
        put it & tab before item colNumber of line x of intoThisTable
    end repeat
    return intoThisTable

on die dyingMessage
    answer dyingMessage
    exit to top
end die

On Thursday, August 28, 2014 2:59:04 PM, JB <sundown at> wrote:

Richard Gaskin wrote a function to get a column
from a list.

function GetCol pData, pCol --Richard Gaskin
    set the itemdel to tab
    put empty into tReturnList
    repeat for each line tLine in pData
        put item pCol of tLine &cr after tReturnList
    end repeat
    delete last char of tReturnList -- trailing CR
    return tReturnList
end GetCol

Does anyone know how to convert this so you can
join the selected columns back together in any
order you want?

John Balgenorth
use-livecode mailing list
use-livecode at
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list