abs function

new topic     » topic index » view thread      » older message » newer message

A cleaner abs function.

function absolutevalue(atom i) -- doesn't need to be an integer!
        atom r
        r =3D i
        if i<0 then
                r =3D -1 * i
        end if
        return r
end function

--Alan
 =

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu