[Jprogramming] How long did the marriages last?
dhkelly
dhky at shaw.ca
Tue Jul 12 03:33:51 UTC 2016
Just a question? Why treat dates as character strings?
A=:1809;'Philip St. George Cooke';1895 might simplify both entry and
operations on the dates. This is true of the previous age problem as
well. Don Kelly
On 7/9/2016 7:19 PM, Linda A Alvord wrote:
> I have put married pairs together. The 4th column has the date for each of
> the three marriages. I can get the length of their marriages but I can't
> seem to insert them into the three boxes which currently contain a zero. I
> can't amend the three years in the boxes. Linda
>
>
>
> A=:'1809';'Philip St. George Cooke';'1895'
>
> B=:'1807';'Rachel Cooke';'1896'
>
> C=:'1830';'John Eaten Cooke';'1886'
>
> D=:'1840';'Mary Frances Cooke';'1878'
>
> E=:'1833';'B Jeb Stuart';'1864'
>
> F=:'1836';'B Flora Cooke Stuart';'1923'
>
> DA=:A,B,C,D,E,:F
>
>
>
> age=: 13 :'y,.,. <"0-/"1"."1>2 0{"1 y'
>
>
>
> DATA=:age DA
>
>
>
> MAR=:<"0,.1830 0 1867 0 1855 0
>
>
>
> [NEW=:3 2 5$,DATA,.MAR
>
> -----T-----------------------T----T--T----┐
> │1809│Philip St. George Cooke│1895│86│1830│
> +----+-----------------------+----+--+----+
> │1807│Rachel Cooke │1896│89│0 │
> L----+-----------------------+----+--+-----
>
> -----T-----------------------T----T--T----┐
> │1830│John Eaten Cooke │1886│56│1867│
> +----+-----------------------+----+--+----+
> │1840│Mary Frances Cooke │1878│38│0 │
> L----+-----------------------+----+--+-----
>
> -----T-----------------------T----T--T----┐
> │1833│B Jeb Stuart │1864│31│1855│
> +----+-----------------------+----+--+----+
> │1836│B Flora Cooke Stuart │1923│87│0 │
> L----+-----------------------+----+--+-----
>
>
>
>
>
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list