#expr problem

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

#expr problem

Ekompute .info
Hi, I am wondering why the expression #expr is not functioning at my website
at Teknologi-maklumat <http://teknologi-maklumat.jbdirectory.com>. I did
install the Parserfunction extension and also set slow parser to true.

--
PM Poon
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: #expr problem

Haim (Howard) Roman
I don't know anything about this feature, but I'd guess that others
could help you better if you:

[1] give an example of the code
[2] what you expect it to do
[3] and what it actually does.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Haim (Howard) Roman
Computer Center, Jerusalem College of Technology
Phone: 052-8-592-599 (6022 from within Machon Lev)


On Mon, Apr 19, 2010 at 01:59, Ekompute .info <[hidden email]> wrote:

>
> Hi, I am wondering why the expression #expr is not functioning at my website
> at Teknologi-maklumat <http://teknologi-maklumat.jbdirectory.com>. I did
> install the Parserfunction extension and also set slow parser to true.
>
> --
> PM Poon
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: #expr problem

Ekompute .info
Hi Haim, thank you for your response. I was trying this formula:

{{formatnum:{{#expr:{{PAGESINNS:102}}*3.5 round 0}}}}

and it didn't work but when i just type {{PAGESINNS:102}}, it works
perfectly. I tried it in another website of mine and both works. I wonder
why.

PM Poon

On Mon, Apr 19, 2010 at 1:03 PM, Haim (Howard) Roman <[hidden email]>wrote:

> I don't know anything about this feature, but I'd guess that others
> could help you better if you:
>
> [1] give an example of the code
> [2] what you expect it to do
> [3] and what it actually does.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Haim (Howard) Roman
> Computer Center, Jerusalem College of Technology
> Phone: 052-8-592-599 (6022 from within Machon Lev)
>
>
> On Mon, Apr 19, 2010 at 01:59, Ekompute .info <[hidden email]> wrote:
> >
> > Hi, I am wondering why the expression #expr is not functioning at my
> website
> > at Teknologi-maklumat <http://teknologi-maklumat.jbdirectory.com>. I did
> > install the Parserfunction extension and also set slow parser to true.
> >
> > --
> > PM Poon
> > _______________________________________________
> > MediaWiki-l mailing list
> > [hidden email]
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>



--
PM Poon

* http://emotional-support.dummipedia.com/Suicide_prevention
* http://learn-chinese.dummipedia.com/Learn_Chinese
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: #expr problem

Jesse (Pathoschild)
Ekompute .info <[hidden email]> wrote:
> Hi, I am wondering why the expression #expr is not functioning at my website
> at Teknologi-maklumat <http://teknologi-maklumat.jbdirectory.com>. I did
> install the Parserfunction extension and also set slow parser to true.
> [...]
> {{formatnum:{{#expr:{{PAGESINNS:102}}*3.5 round 0}}}}

Hello PM Poon,

#expr works fine on your wiki, but you cannot use commas in
mathematical expressions. {{PAGESINNS:102}} evaluates to "2,387", but
you can get a raw number (without comma) with {{PAGESINNS:102|R}}.

--
Yours cordially,
Jesse (Pathoschild)

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: #expr problem

Daniel Bishop-2
In reply to this post by Ekompute .info
Hi,

This is because the {{PAGESINNS}} is returning 2*,*387.  The comma
(thousands) seperator causes #expr to fail as it only recognises raw numbers
for calculation purposes.  If you use the |R (raw number) parameter (i.e.
{{PAGESINNS:102|R}}, it should work.

Regards,
Daniel

On 19 April 2010 06:14, Ekompute .info <[hidden email]> wrote:

> Hi Haim, thank you for your response. I was trying this formula:
>
> {{formatnum:{{#expr:{{PAGESINNS:102}}*3.5 round 0}}}}
>
> and it didn't work but when i just type {{PAGESINNS:102}}, it works
> perfectly. I tried it in another website of mine and both works. I wonder
> why.
>
> PM Poon
>
> On Mon, Apr 19, 2010 at 1:03 PM, Haim (Howard) Roman <[hidden email]
> >wrote:
>
> > I don't know anything about this feature, but I'd guess that others
> > could help you better if you:
> >
> > [1] give an example of the code
> > [2] what you expect it to do
> > [3] and what it actually does.
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Haim (Howard) Roman
> > Computer Center, Jerusalem College of Technology
> > Phone: 052-8-592-599 (6022 from within Machon Lev)
> >
> >
> > On Mon, Apr 19, 2010 at 01:59, Ekompute .info <[hidden email]>
> wrote:
> > >
> > > Hi, I am wondering why the expression #expr is not functioning at my
> > website
> > > at Teknologi-maklumat <http://teknologi-maklumat.jbdirectory.com>. I
> did
> > > install the Parserfunction extension and also set slow parser to true.
> > >
> > > --
> > > PM Poon
> > > _______________________________________________
> > > MediaWiki-l mailing list
> > > [hidden email]
> > > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
> > _______________________________________________
> > MediaWiki-l mailing list
> > [hidden email]
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
>
>
>
> --
> PM Poon
>
> * http://emotional-support.dummipedia.com/Suicide_prevention
> * http://learn-chinese.dummipedia.com/Learn_Chinese
>  _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: #expr problem

Ekompute .info
In reply to this post by Jesse (Pathoschild)
Hi Jesse, that was magical! I suspected that, among many many suspects, and
I tried {{PAGESINNS:102}}:R which of course didn't work.

Thank you very very much. An expression on the homepage was indeed very very
ugly.

PM Poon

On Mon, Apr 19, 2010 at 7:22 PM, Jesse (Pathoschild)
<[hidden email]>wrote:

> Ekompute .info <[hidden email]> wrote:
> > Hi, I am wondering why the expression #expr is not functioning at my
> website
> > at Teknologi-maklumat <http://teknologi-maklumat.jbdirectory.com>. I did
> > install the Parserfunction extension and also set slow parser to true.
> > [...]
> > {{formatnum:{{#expr:{{PAGESINNS:102}}*3.5 round 0}}}}
>
> Hello PM Poon,
>
> #expr works fine on your wiki, but you cannot use commas in
> mathematical expressions. {{PAGESINNS:102}} evaluates to "2,387", but
> you can get a raw number (without comma) with {{PAGESINNS:102|R}}.
>
> --
> Yours cordially,
> Jesse (Pathoschild)
>
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>



--
PM Poon

* http://emotional-support.dummipedia.com/Suicide_prevention
* http://learn-chinese.dummipedia.com/Learn_Chinese
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l