Your sample has opened the door to arrays for me.
I love arrays now that I know how to use them.
thanks a lot!
John Balgenorth
On Aug 28, 2014, at 5:51 PM, Phil Davis wrote:
> Arrays are great for many uses! I'm glad you got it to work. The BYU lessons
> are a good place to learn a lot.
>
>
Arrays are great for many uses! I'm glad you got it to work. The BYU
lessons are a good place to learn a lot.
Phil
On 8/28/14, 3:47 PM, JB wrote:
Hi Phil,
Thank you so many times!!!
It does work. I was thinking i needed to add more to it
and never tried it like it was.
This is my first ti
Hi Phil,
Thank you so many times!!!
It does work. I was thinking i needed to add more to it
and never tried it like it was.
This is my first time with arrays. So I was looking around
for infö and in the process came up with a good lesson on
arrays.
http://revolution.byu.edu/arrays/introToArra
Hi John,
It should work if you just say "combine pData by column" and nothing
more. At least it does here - just tested it. It restructures the pData
array back into its original list format, but with items moved to their
new positions.
Phil
On 8/28/14, 2:27 PM, JB wrote:
Hi Phil,
I am h
That was wrong. It should be, But it does
not give me a whole table.
on mouseUp
put fld id 1056 into intoThisTable
split intoThisTable by column
put intoThisTable[4] into dataToInsert
put insertAsColumn (3, dataToInsert, intoThisTable) into newTable
put newTable into fld id 4738
end
Hi Alain,
I am having trouble getting it to insert the column.
Here is the code I am using to access your function.
local dataToInsert, intoThisTable
on mouseUp
put fld id 1056 into pData
split pData by column
put pData[4] into dataToInsert
put insertAsColumn (3, dataToInsert, into
Hi Phil,
I am having trouble with the proper way
to write the combine pData by column.
I can split the columns and reverse them
like you show but how do you write the
code to combine them? It looks to me
from the dictionary the column needs
to be a number but what line do I need
to put them on?
Improved it again :
function insertAsColumn colNumber, dataToInsert, intoThisTable
--
if dataToInsert is empty then
answer "insert empty column ?" with "cancel" or "insert"
if it is "cancel" then exit to top
end if
--
if intoThisTable is empty then return dataTo
Haha. I like the paranoid version :)
SKIP
On Thu, Aug 28, 2014 at 3:53 PM, Alain Farmer
wrote:
> Here is the paranoid version :
>
> function insertAsColumn colNumber, dataToInsert, intoThisTable
> --
> if dataToInsert is empty then
> answer "insert empty column ?" with "cancel"
Here is the paranoid version :
function insertAsColumn colNumber, dataToInsert, intoThisTable
--
if dataToInsert is empty then
answer "insert empty column ?" with "cancel" or "insert"
if it is "cancel" then exit to top
end if
--
if intoThisTable is empty then re
Thank you, Alain! This example will
help me out.
John Balgenoth
On Aug 28, 2014, at 12:24 PM, Alain Farmer wrote:
> Correction:
>
> function insertAsColumn colNumber, dataToInsert, intoThisTable
> --
> if the number of lines of dataToInsert is not the number of lines of
> intoThisTa
That is what I thought but once again thank yu
for the info and the clarification. It helps a lot!
John Balgenorth
On Aug 28, 2014, at 12:17 PM, Phil Davis wrote:
> Before doing the 'split', you could set the columnDelimiter to whatever char
> is used as the item delimiter. In other words, y
Correction:
function 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
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
Before doing the 'split', you could set the columnDelimiter to whatever
char is used as the item delimiter. In other words, you aren't limited
to tabs as your column delimiter.
Phil
On 8/28/14, 12:10 PM, Phil Davis wrote:
If pData is a CR-delimited list where each line contains tab-delimited
Thanks a whole bunch, Phil !!!
John Balgenorth
On Aug 28, 2014, at 12:10 PM, Phil Davis wrote:
> If pData is a CR-delimited list where each line contains tab-delimited items,
> why not use 'split by column'?
>
> -- example: switch positions of columns 2 and 4
>
> split pData by column
>
If pData is a CR-delimited list where each line contains tab-delimited
items, why not use 'split by column'?
-- example: switch positions of columns 2 and 4
split pData by column
put pData[4] into tTemp2
put pData[2] into pData[4]
put tTemp2 into pData[2]
-- then put it back toget
17 matches
Mail list logo