Correct Oleg;
There are cleaver ways to avoid the problem .. but remember that x and y are
probably the most common of all mathematical variable names that are now
being boxed into a special significance.
The names x., y. et all were special and looked special; fine but
eliminating any part of the a through Z series as regular nouns I believe to
be unfortunate.
David
from Oleg:
The special names, x,y,m,n,u,v apprear selectively
as local variables.
Here's what you could do, to see which ones
are in effect.
test=: 3 : ('x=:3+4';'y=:1+2')
test
3 : 0
x=:3+4
y=:1+2
)
13!:0]1 NB. enable suspension
test 'a'
|domain error: test
| y =:1+2
|test[1]
13!:13''
+----+-+-+-+---------------------++---+------+-+
|test|3|1|3|3 : 0 x=:3+4 y=:1+2 )||+-+|+--+-+|*|
| | | | | |||a|||y |a|| |
| | | | | ||+-+|+--+-+| |
| | | | | || ||y.|a|| |
| | | | | || |+--+-+| |
+----+-+-+-+---------------------++---+------+-+
NB. See, 'y' is already assigned locally
13!:0]1 NB. reset stack
x
7
names'' NB. where is x?
test
cofullname <,'x'
x_base_
x_base_ NB. hm, probably, it's just filtered out
7
--- David Vincent-Jones <[EMAIL PROTECTED]> wrote:
> Chris;
>
> Not to belabor the point .. here is where my confusion started.
>
> test=:3 : 0
> x=:3+4
> y=:1+2
> ax's
> )
> load 'c:\j601\temp\6.ijs'
> test ''
> |domain error: test
> | y =:1+2
>
> completes with x but is an error for y
>
> Then allows both x and y
>
> y=:1+2
> y
> 3
> x,y
> 7 3
>
> Anyway, I will stop using x and y as variables and keep with x. and y.
> as arguments ... for my mental health.
>
> David
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Chris Burke
> Sent: Tuesday, April 11, 2006 6:23 PM
> To: Beta forum
> Subject: Re: [Jbeta] x and y variables
>
>
> David Vincent-Jones wrote:
> > I now understand that the use of 'x' and 'y' as assigned variables
> > is
> > totally removed from J601 ...
> >
> > domain error: ToTM
> > | y =:arctan(tand 40.5)%(cosd(_75-_73.5))
>
> Just to clarify - y can be assigned locally, but usually not globally
> since it already has a local definition, and J6 does not permit both
> local and global assignments.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm