Coding question

Roelof
Roelof Member Posts: 377
I have a question regarding coding:

CodeUnit 212 in function 'Code'. The coding is here like:
With ResJnlLine do begin
WITH ResLedgEntry DO BEGIN
END
END;

I always thought that that is wrong programming.
Let me know.
Roelof de Jonghttp://www.wye.com

Comments

  • Mbad
    Mbad Member Posts: 344
    Its not wrong per se, its just lousy.
  • DenSter
    DenSter Member Posts: 8,307
    I never even use WITH, I think that makes code utterly unreadable. As long as the whole thing is on one page it's ok, but most of the time it spans multiple pages, and I always lose track of which variable we're looking at. Plus I always use F5, and that always puts the variable name in there anyway, so writing code for WITH actually takes more time, because you have to delete all the variable names.
  • kriki
    kriki Member, Moderator Posts: 9,121
    DenSter wrote:
    I never even use WITH, I think that makes code utterly unreadable. As long as the whole thing is on one page it's ok, but most of the time it spans multiple pages, and I always lose track of which variable we're looking at. Plus I always use F5, and that always puts the variable name in there anyway, so writing code for WITH actually takes more time, because you have to delete all the variable names.
    I completely agree with this statement!
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • diptish.naskar
    diptish.naskar Member Posts: 360
    Its not a wrong programming........but yes...as kirki...agreed I do also to what Denester said..
    Diptish Naskar
    For any queries you can also visit my blog site: http://msnavarena.blogspot.com/