[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Use of &scop

  • Thread starter Thread starter Patrick Tingen
  • Start date Start date
Status
Not open for further replies.
P

Patrick Tingen

Guest
&SCOPED-DEFINE was designed to be valid only in the file you define it in, so if you define it in an include, it is not valid outside of that include. &GLOBAL-DEFINE is valid throughout the whole compilation unit. Besides that, I would like to urge you to restrain yourself from overusing includes. They seem very handy and they are for defining stuff like datasets or temp-tables and the like, but don't use them for real code. With that I mean with that is constructions like this: { find.i &table=customer &where="cust-id = 12" &lock=exclusive } find.i FIND {&table} WHERE {&where} {&LOCK}-LOCK NO-ERROR. They create an unnecessary coupling of programs. By using includes in this way, you couple all programs that use it to each other, even though those programs have nothing to do with each other. I noticed that you used it for statuses and that is OK (consider using enums!) but I just wanted to point it out.

Continue reading...
 
Status
Not open for further replies.
Back
Top