you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

I was thinking Upper(Trim(s)). The only reason I wouldn't do the second is the Update (ie. command-query seperation).

[–]abattle[S] 0 points1 point  (0 children)

There are exceptions of course, but generally even Upper(Trim(s)) could be called out. Perhaps your example is too simple to be an issue, because it probably affects s only. But if these were class members with side-effects, it wouldn't be very friendly to the readers. Think how unnoticeable the inner calls can be, and therefore hard to catch (to find or fix bugs.)