I don't agree that RESULT[1] is any clearer/cleaner than RESULT[LEN(RESULT),1].
Does the [1] represent the FIRST character or the LAST character? I will agree that it's shorter to write. =) -- Donald Verhagen Application Development Manager [EMAIL PROTECTED] Tandem Staffing Solutions, Inc. 5901 Broken Sound Parkway NW, Suite 450 Boca Raton, FL 33487 USA Voice Phone: 561.226.8261 Fax Phone: 561.226.8115 >>> On 8/25/2006 at 1:26 pm, in message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > David A. Green wrote: >> Why do programmers use result[LEN(result),1]? Doesn't result[1] do the same >> thing but easier, quicker, and more readable? > <snip> > > variable[1] to reference the last byte of variable is a relatively > recent addition to Universe. Where "relatively" refers to the lifeline > of the Pick/PI/U2 product family. > > So you'll typically see it either in older code, or in code written by > guys who've been programming a while and haven't picked up on all of the > "newer" facilities. > > I vaguely remember it being introduced and enjoying the fact that I > could write less code and have it more readable. So it became one of > the things I tended to retrofit as I was working on existing code, not > worth looking for, but worth cleaning up while I was in the neighborhood. ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/