[progress Communities] [progress Openedge Abl] Forum Post: Re: What's The Use Of The Assign...

  • Thread starter Thread starter Marko Myllymäki
  • Start date Start date
Status
Not open for further replies.
M

Marko Myllymäki

Guest
One thing to consider is error handling. Sample code: DEF VAR d AS DATE. DEF VAR i AS INT. ASSIGN i = 1 d = DATE("x") /* assign is interrupted here */ i = 2 /* this is not executed */ NO-ERROR. MESSAGE i. /* = 1 */ ASSIGN i = 1. ASSIGN d = DATE("x") NO-ERROR. ASSIGN i = 2. MESSAGE i. /* = 2 */ The first message displays 1; the first assign is interrupted because of failing date conversion. The second message displays 2 because also the last assignment is executed. In this case the failing conversion is not disturbing other assignments. So this might have an influence on how you write assigns.

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