> From: Raul Miller <[EMAIL PROTECTED]>
>
> Currently, the expression ('')=:'' produces an error.
>
> But I think that this boundary case should be legal.
>
> This could be useful, for example, when assigning to a
> dynamically constructed list of names.
>
> For example:
> require'dd'
> dbs=: (#~ 'DB' (1 e. E.)S:0]) {."1 ddsrc''
> need=: (0 ~: nc dbs)#dbs
> (need)=: 'dsn=' ddcon@,L:0 need
> |ill-formed name: script
> | (need) =:'dsn='ddcon@,L:0 need
> #dbs
> 7
>
> But would this be useful to anyone besides me?
Well, left-hand-side '' is a legitimate value and
right-hand-side ('') is illegitimate name.
Can't you just do an if test?
Also
assign=: 1 : 'empty (m)=: y'
'a' assign 2
a
2
'' assign ''
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm