error 001: expected token: "-identifier-", but found "("
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
That's for floats. There's nothing wrong with the function itself (although it can be written shorter, see below) so you probably placed it in the wrong spot.

PHP код:
stock abs(value)
    return (
value 0) ? -value value
Yes, but you can use floatabs with integers as well. All you need to do is round it after getting it's absolute value.
Reply


Messages In This Thread
-- DELETED -- - by danielpalade - 13.12.2016, 00:29
Re: error 001: expected token: "-identifier-", but found "(" - by BiosMarcel - 13.12.2016, 00:36
Re: error 001: expected token: "-identifier-", but found "(" - by GoldenLion - 13.12.2016, 06:21
Re: error 001: expected token: "-identifier-", but found "(" - by Vince - 13.12.2016, 08:22
Re: error 001: expected token: "-identifier-", but found "(" - by GoldenLion - 13.12.2016, 13:12

Forum Jump:


Users browsing this thread: 1 Guest(s)