lua-l archive
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
MI classes - Second bug in example
From
: Hugo Etchegoyen <hetchegoyen@
...
>
Date
: Tue, 30 Jan 2007 17:16:42 -0300
Sorry for this, I wrote the example in haste. Limit checking was erroneous, it works in the example just because the limit is 0. This is the correct way:
function LimitedAccount:withdraw(amount)
if self:getbalance() - amount < self.limit then
...
Regards,
Hugo Etchegoyen
Prev by Date:
MI classes - Interesting bug in example
Next by Date:
CE
Previous by thread:
MI classes - Interesting bug in example
Next by thread:
CE
Index(es):
Date
Thread