From:

Date:

March 2, 2021 08:34Subject:

Re: 'CALL-ME' Math problem?Message ID:

CAG31Jujzff4mag2u7KHOPOcuu6BJLTcCEi4-7eq1FEPVG3u8zw@mail.gmail.comJust because mathematics allows an implied multiplication doesn't mean Raku does -- in fact I can't think of any programming language which does. You need to stick an explicit multiplication operator ('*' or '×') between the 5 and the left parenthesis. The reason for the error message is that adding parentheses after something is interpreted as trying to invoke a function. Callable objects such as functions have a CALL-ME method which is what is invoked to call the function. An integer lacks such a method, since it isn't callable. On Tue, 2 Mar 2021 at 19:13, ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > > Hi All, > > Math problem: > x = 60÷5(7−5) > > raku -e 'say 60÷5(7−5)' > No such method 'CALL-ME' for invocant of type 'Int' > in block <unit> at -e line 1 > > Seems raku does not like the (). How do I fix this > and maintain the flow and look of the equation? > > -T > > The correct answer is 24 > > >Thread Next

**Re: 'CALL-ME' Math problem?**by Kevin Pye- 'CALL-ME' Math problem? by ToddAndMargo via perl6-users
- Re: 'CALL-ME' Math problem? by Wenzel P. P. Peppmeyer
- Re: 'CALL-ME' Math problem? by ToddAndMargo via perl6-users
- Re: 'CALL-ME' Math problem? by ToddAndMargo via perl6-users
- Re: 'CALL-ME' Math problem? by Daniel Sockwell
- Re: 'CALL-ME' Math problem? by Parrot Raiser
- Re: 'CALL-ME' Math problem? by Vadim Belman
- Re: 'CALL-ME' Math problem? by Matthew Stuckwisch
- Re: 'CALL-ME' Math problem? by Fernando Santagata

nntp.perl.org: Perl Programming lists via nntp and http.

Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About