2

this seems simple to me, but i can not find the proper attribute. for error reporting purposes, i'd like to know the name of the internal procedure i'm in.

Here is the simplest of examples:

Run Test.

Procedure Test.

/* how can i display the procedure name 'test' here? */

End Procedure.

Tom Bascom
  • 13,405
  • 2
  • 27
  • 33
Jeremy_s
  • 21
  • 2

1 Answers1

5

Have a look at PROGRAM-NAME() function.

As per the documentation:

If the procedure you reference is an internal procedure, then PROGRAM-NAME returns a string with the following form:
"internal-procedure-name source-file-name"

For the example you gave:

Run Test.

Procedure Test.
     message PROGRAM-NAME(1).
End Procedure.
trashr0x
  • 6,457
  • 2
  • 29
  • 39
Austin
  • 1,237
  • 1
  • 11
  • 22
  • Yes, thank you. I had tried this but didn't notice it was returning a list, i only saw the actual program path/name in the message. Thank you! – Jeremy_s Sep 16 '15 at 14:14