Yes. My bad. I had always used "define" when making something for others. I was just thinking of "def" as an arbitrary name and stupidly forgot to look to see if it was already defined in "z".
On Mon, Dec 4, 2023 at 12:39 PM Elijah Stone <[email protected]> wrote: > Raul's point was that def was _already_ assigned to a global name, and > nothing > changed when you defined abc. > > On Mon, 4 Dec 2023, Don Guinn wrote: > > > True. I have used that a lot as well before }} . But it looks like in the > > processing of the direct definition that "def" inadvertently got assigned > > as a global name. > > > > On Mon, Dec 4, 2023 at 11:49 AM Raul Miller <[email protected]> > wrote: > > > >> verb def '+/y' > >> 3 : '+/y' > >> nc<'def_z_' > >> 2 > >> > >> We used to use this rather often, before {{ }} notation was introduced. > >> > >> -- > >> Raul > >> > >> On Mon, Dec 4, 2023 at 1:30 PM Don Guinn <[email protected]> wrote: > >> > > >> > "def" is assigned a strange value even before "abc" is run. Defining > >> unsing > >> > explicit instead of direct definition properly has "jkl" undefined > until > >> > after ":ghi" runs. "ghi" got defined even though "ghi" is only a local > >> name. > >> > > >> > > >> > names'' > >> > > >> > abc=:{{def=:y}} > >> > > >> > def > >> > > >> > ┌─┐ > >> > > >> > │:│ > >> > > >> > └─┘ > >> > > >> > abc > >> > > >> > ┌─┬─┬──────┐ > >> > > >> > │3│:│def=:y│ > >> > > >> > └─┴─┴──────┘ > >> > > >> > abc 1 2 3 > >> > > >> > 1 2 3 > >> > > >> > def > >> > > >> > 1 2 3 > >> > > >> > ghi=:3 : 'jkl=:y' > >> > > >> > jkl > >> > > >> > |value error: jkl > >> > > >> > ghi > >> > > >> > ┌─┬─┬──────┐ > >> > > >> > │3│:│jkl=:y│ > >> > > >> > └─┴─┴──────┘ > >> > > >> > ghi 4 5 6 > >> > > >> > 4 5 6 > >> > > >> > jkl > >> > > >> > 4 5 6 > >> > > >> > > >> > erase nl '' > >> > > >> > abc=:{{def=.y}} > >> > > >> > def > >> > > >> > ┌─┐ > >> > > >> > │:│ > >> > > >> > └─┘ > >> > > >> > JVERSION > >> > > >> > Engine: j9.5.0-beta8/j64avx2/windows > >> > > >> > Build: commercial/2023-11-27T11:54:21/clang-16-0-6/SLEEF=1 > >> > > >> > Library: 9.5.5 > >> > > >> > Qt IDE: 2.5.1/6.2.4(6.2.4) > >> > > >> > OS Ver: Windows 11 Version 2009 10.0.22635 > >> > > >> > Platform: Win 64 > >> > > >> > Installer: j9.5 install > >> > > >> > InstallPath: c:/j9.5 > >> > > >> > Contact: www.jsoftware.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 > >> > > ---------------------------------------------------------------------- > > 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
