Personally I don't use Note albeit it is inside stdlib, but I think it
will be nice to add support for it into format script. But unlike
other explicit definitions, the pattern for matching this Note is
rather short, will there be any possibility for bogus match?  If it
were ^Note$ then it would be more secure.

Чтв, 03 Июн 2010, Sherlock Ric писал(а):
> In J6.02 and currently in J7.01 the Script|Format command gives an error when 
> asked to format a script that contains a Note definition (i.e. a multiline 
> comment):
> 
>   Could not match begin and end of multi-line definition:
>   Unmatched closing paren
> 
> It would be nice to add support for this.
> 
> The following patch to trunk/main/pp/util.ijs does the job by just treating 
> Note as another form of Noun definition (which it essentially is) for the 
> purposes of formatting, rather than treating it as a separate special case. 
> Is that acceptable?
> 
> Anyone can test this by editing 
> ~system/extras/util/pp.ijs  NB. J6.02
> ~system/util/pp.ijs         NB. J7.01 beta
> 
> And adding an extra line to the definition of NOUNDEFINE
> 
> 
> Index: util.ijs
> ===================================================================
> --- util.ijs  (revision 20)
> +++ util.ijs  (working copy)
> @@ -44,6 +44,7 @@
>  noun \: 0
>  0 \define
>  noun \define
> +Note
>  )
>  
>  NB. =========================================================

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to