what do you think of this?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: what do you think of this?
- From: Asko Kauppi <asko.kauppi@...>
- Date: Thu, 5 Feb 2004 02:01:46 +0200
Insteead of the regular "_,_, str= string.find( " I'm considering
using the following functions:
-----
-- Useful when needing just a single return value (i.e. from
'string.find()')
--
function first( ... ) return arg[1] end
function second( ... ) return arg[2] end
function third( ... ) return arg[3] end
This makes the code easier to read, and is not so obscure as the
built-in '( )' notation
(that only extracts the first item anyhow).
What do you normally do - are there better ways to achive this?
-ak