1. Re: QBasic --> Euphoria (again)

Ralf Nieuwenhuijsen wrote:
> >I'm pretty new to the Euphoria scene, but let's see...
>  And I'll fill the other 3 with a few how-to's..

Cool!  Enjoyed reading them.  ;')

> >> ABS (gives the ABSolute value of a number)
> >function absolutevalue(integer i)
> >        integer r
> >        r = i
> >        if i<0 then
> >                r = -1 * i
> >        end if
> >        return r
> >end function
> More euphoric would be, allowing both atoms and sequences:
> function abs (object x)
>     return x < 0 * -2 + x
> end function

whoa!  I figured it could be done easier, but...!

> -- Eat that Basic! blink

Really!

___
_|ohn

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu