Use REF keyword

Share this topic:

Link to this posting

Postby Ursego » 19 Feb 2013, 22:19

Always add REF before actual parameters passed to a called method by reference.

In fact, this short keyword is playing the role of a comment:

Code: Select all
dw_main.GetChild("status", ref ldwc_status)

It really helps to understand scripts, especially when calling functions have multiple arguments in both the logical directions - "in" and "out". It was a bad solution of PB creators to make ref an optional keyword - let's make it required of our own free will!
User avatar
Site Admin
Posts: 112
Joined: 19 Feb 2013, 20:33

Return to Elegant Code

Who is online

Users browsing this forum: No registered users and 1 guest

Use REF keyword

Share this topic:

If you think that this site is not too bad, please LIKE it in Facebook. Thanks!

free counters

eXTReMe Tracker