A suggestion - Wouldn't the definition of cofullname be better as:
NB.*cofullname v return name with locale qualifier
cofullname=: 3 : 0"0
y=. ,> y
if. #y do.
if. ('_' = {: y) +: 1 e. '__' E. y do.
y,'_',(>18!:5''),'_'
end.
end.
)
Putting the comma after the open eliminates a single letter name being a
special case and making it rank zero allows it to generate multiple names.
cofullname 'x';'y'
x_base_
y_base_
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm