3P icon indicating copy to clipboard operation
3P copied to clipboard

Missing zones for run code on RUN statement (I'll explain you :))

Open ccleaud opened this issue 9 years ago • 0 comments

Hello dear,

If you

RUN the-below-program.p

2 zones of code will be run:

  • MESSAGE "Hello" VIEW-AS ALERT-BOX.
  • MESSAGE "Bye bye" VIEW-AS ALERT-BOX. + RUN xxx

However, the code explorer doesn't show those sections: 1

Thanks a lot for making zones on main runnable code appear in the code explorer.

/* A nice file */

&SCOPED-DEFINE XXX           YES
&SCOPED-DEFINE YYY           NO

DEFINE VARIABLE aVariable           AS CHARACTER    NO-UNDO.
DEFINE VARIABLE hProg               AS HANDLE       NO-UNDO.

MESSAGE "Hello" VIEW-AS ALERT-BOX.

/* ********************** Function Definitions ************************** */

FUNCTION computeSomething RETURNS CHARACTER (INPUT xxx AS CHARACTER):
    RETURN QUOTER(xxx).
END FUNCTION.



/******************************* Main Block *********************************/

ON "CLOSE" OF THIS-PROCEDURE DO:
   DELETE PROCEDURE THIS-PROCEDURE.
END.

RUN my-program PERSISTENT SET hProg.
MESSAGE "Bye bye" VIEW-AS ALERT-BOX.
RETURN "".


/* ************************ Internal Procedures ************************* */

PROCEDURE doSomething:
    RETURN "".
END PROCEDURE.

ccleaud avatar Oct 28 '16 08:10 ccleaud