Eric Iverson wrote:

> An option is to include the delimiters in the variables. The following:
> 
> title=:'hey hey'
> text=: 'this is the message'
> wd 'mb "',title,'""',text,'"'
> 
> Could be done as:
> 
> title=:'"hey hey"'
> text=: '"this is the message"'
> wd 'mb ',title,text
> 
> And where there are or might be " chars in the paramter, use DEL delimiter:
> 
> title=:'"hey hey"'
> text=: DEL,'this message had "quotes"',DEL
> wd 'mb ',title,text

Instead of including the delimiters in the text definition, they may be added 
through a preparatory verb. The result is not so clean a call to wd as when the 
delimiters are embedded in each noun, but keeping the delimiters out of noun 
definitions has its own tidiness.

   qtEach=: ;@:(([: DEL&, ,&DEL) &.>)

Using that, the wd call would be:

   wd 'mb ',qtEach title;text

Double-quotes may occur in those nouns, of course.


      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to