There is also dyadic 4 scripts which automatically define left and right
parameters. Use 3 for monadic scripts, defines y only on right hand side.
table =: 4 : 'x $ y'
5 5 table 5
 or multiline
table =: 4 : 0
x $ y
)
5 5 table 5




On Friday, April 11, 2014, Linda Alvord <[email protected]> wrote:

>
> Here are some possibilities:   x=:5
>    y=:6
>    x,y$6
> 5 6 6 6 6 6 6
>
>    (x,y)$6
> 6 6 6 6 6 6
> 6 6 6 6 6 6
> 6 6 6 6 6 6
> 6 6 6 6 6 6
> 6 6 6 6 6 6
>
>    1 4 8 56 3 $~ x,y
>  1  4  8 56  3  1
>  4  8 56  3  1  4
>  8 56  3  1  4  8
> 56  3  1  4  8 56
>  3  1  4  8 56  3
>
>
> Linda
>
>
> -----Original Message-----
> From: [email protected] <javascript:;> [mailto:
> [email protected] <javascript:;>] On Behalf Of
> Björn Helgason
> Sent: Friday, April 11, 2014 7:22 AM
> To: Programming forum
> Subject: Re: [Jprogramming] Two small questions. :D
>
> Try:
>
> 1 4 8 56 3 $~ x,y
>
> -
> Björn Helgason
> gsm:6985532
> skype:gosiminn
> On 9.4.2014 19:13, "Ray Zhao" <[email protected] <javascript:;>>
> wrote:
>
> > Hi all, I have two small questions:
> > 1. How do you use variables as such:
> > x y $ 5
> > I have found many examples with actual nums such as 5 6 $ 6 and I know
> that
> > x y is a syntax error, but I'm not sure how to make it NOT a syntax
> error.
> >
> > 2. Can different types, when combined, only produce boxes? This is much
> > less of a concern for me but I think it's worth confirming:
> > One example is:
> > secs=.5
> > 'The number of seconds '; secs
> > I have searched a little on the vocabulary site and all the examples
> that I
> > have seen with > (open) only unbox same types. , (append) also only
> appends
> > the same types too.
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to