I didn't get it. is parsed as
(}:@:;)@:(,&','&.>) If parser can look ahead, it should see }:@:(;@:(,&','&.>)) If it can't then writing it as (;@:(,&','&.>)) Provides no new information for parser to recognize special code. On Thu, 10 Nov 2022 at 10:34 PM Henry Rich <[email protected]> wrote: > Thanks Bill. I just want to note a fine point of special code: > > }:@:;@:(,&','&.>) > > is parsed as > > (}:@:;)@:(,&','&.>) > > Better is > > }:@:(;@:(,&','&.>)) > > because then the interpreter sees the form > > ;@:(,&','&.>) > > which says 'do something inside the boxes and then immediately join the > contents'. > > Armed with the knowledge, the interpreter can leave the contents of the > boxes virtual (something it normally is not allowed to do) until they > are joined. > > Henry Rich > > > > On 11/10/2022 7:05 AM, bill lam wrote: > > It should be a bug that already fixed in the latest j904 beta. You may > > workaround it by replace {: with its equivalent, eg > > > > >(([:,&','each}:),{.@:(_1&{.));:'cat dog mouse' > > cat, > > dog, > > mouse > > > > That said, I would usually do it this way > > }:@:;@:(,&','&.>);:'cat dog mouse' > > cat,dog,mouse > > > > > > On Thu, Nov 10, 2022 at 4:42 PM esal <[email protected]> wrote: > > > >> Hi everybody > >> > >> I have an old verb that transforms a boxed array containing database > table > >> column names into a string suitable for copying and pasting into a SQL > >> SELECT statement. It crashes J903. > >> > >> Here is a simplified demonstration. > >> > >> > >>> JVERSION > >>> > >>> Engine: j903/j64avx2/windows > >>> > >>> Release-b: commercial/2022-01-28T04:09:50 > >>> > >>> Library: 9.03.08 > >>> > >>> Qt IDE: 1.9.5s/5.15.2(5.15.2) > >>> > >>> Platform: Win 64 > >>> > >>> Installer: J903 install > >>> > >>> InstallPath: c:/j903 > >>> > >>> Contact: www.jsoftware.com > >>> > >> > >>> NB. this works > >>> > >>> ]aux=.;:'cat dog mouse' > >>> > >>> ┌───┬───┬─────┐ > >>> > >>> │cat│dog│mouse│ > >>> > >>> └───┴───┴─────┘ > >>> > >>>> (([:,&',' each}:),{:)aux > >>> cat, > >>> > >>> dog, > >>> > >>> mouse > >>> > >>> > >>> NB. this crashes J > >>> > >>>> (([:,&',' each}:),{:);:'cat dog mouse' > >>> > >>> Best Regards, > >> Esa > >> ---------------------------------------------------------------------- > >> 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
