Often I need to do
6!:2 'f ''a'''
or
dissect '0{"1 (1!:0 ''addons'')'
or
(3 : 'smoutput ''hi''')''
It can be tricky to keep track of the double single quotes. Does
anyone have any tricks or use any functions to make it easier?
This is primarily in the interpreter, not for user in a production script
Something like:
quo =: ('`';'''') rplc~ ]
dissect quo '0{"1 (1!:0 `addons`)'
The backtick may not be the best choice for everyone, but I don't
often use it in strings
The nice thing is I can then just hit ctrl+shift+up to get the last
statement and then drop the first part to get quo '0{"1 (1!:0
`addons`)' and then copy and paste the string to run it standalone
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm