lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.