The question is why you are doing this. If it is because of development or something you want for when the system is running.
You can of course make sure the caller sends its name in as part of arguments passed. During development I usually pepper smoutput all over the code. For a running application I usually write out stuff in logfiles and/or use wdstatus to see if everything is running ok. 2011/1/25 Ian Clark <[email protected]> > If I define two or more verbs tacitly like this: > > act1 =: action > act2 =: action > ... > > how, inside the verb: action, can I identify the calling verb -- > ideally as the literal name, eg 'act1'? > > I can solve the problem ... > > (a) by having the caller pass its own name as an argument in a rather > more complex tacit expression, eg > > act1 =: action bind 'act1' > act2 =: action bind 'act2' > ... > > (b) by enabling suspension with: (13!:0)1 (in the caller of act1, > act2) and then inspecting the stack within action by means of 0{"1 > (13!:13 '') > ...which is what I'm using at present. > > (a) is not out of the question, but complicates the code, especially > generated code. > And I don't like (b) -- besides being clumsy I anticipate gotchas in > the long term. > > Am I right to feel edgy about (b), for general application? > > Is there a neater way? > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Björn Helgason, Verkfræðingur Fornustekkum II 781 Hornafirði, t-póst: [email protected] gsm: +3546985532 sími: +3544781286 http://groups.google.com/group/J-Programming Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans góður kennari getur stigið á tær án þess að glansinn fari af skónum /|_ .-----------------------------------. ,' .\ / | Með léttri lund verður | ,--' _,' | Dagurinn í dag | / / | Enn betri en gærdagurinn | ( -. | `-----------------------------------' | ) | (\_ _/) (`-. '--.) (='.'=) ♖♘♗♕♔♙ `. )----' (")_(") ☃☠ ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
