Coding question

RoelofRoelof 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

  • MbadMbad Member Posts: 344
    Its not wrong per se, its just lousy.
  • DenSterDenSter Member Posts: 8,304
    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.
  • krikikriki Member, Moderator Posts: 9,086
    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.naskardiptish.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/
Sign In or Register to comment.