Re: When is multiple assignment good style?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: When is multiple assignment good style?
- From: "Paul E. Merrell, J.D." <marbux@...>
- Date: 2017年3月13日 02:59:01 -0700 (MST)
Add a couple of obvious ones that I use a lot:
* When host program's API method has multiple returns, e.g.,
int, string Nc_GUI_SelectionDlg( string strWindowTitle[, string
strItem1, string strItem2, ...])
Returns the index of the menu item selected and the text of that menu
item. Index is -1 if user canceled.
* Conditional permutations, e.g., for character offset spans:
if nFrom > nTo then
nFrom, nTo = nTo, nFrom
end
Best regards,
Paul
View this message in context:
Re: When is multiple assignment good style?
Sent from the
Lua-l mailing list archive at Nabble.com.