funtions on windows

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

funtions on windows

Muaadh salih
My apology for the typos of yesterday message .
  Still upon further investigation  we found that  the following function:
-----------------

function plural count, textw
   if count <> 1 then put "s" after textw
   if count = 0 then put "no" into count
   return  count && textw
end plural
-------------------
   works perfectly on Rev 2.6 on Mac G4 with OSX 10.3.9. However it
does not work on Rev. 2.6 on Windows XP ( when called : Plural ( 3,
"Book") it returns  ( 3 s) only
again is this a bug on the XP version ?!

any idea ?


Muaadh Salih
[hidden email]
--



All the best



Muaadh Salih
SOAS
Department of Near & Middle Eastern Studies
Tel . +44 (0)2078984354
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: funtions on windows

Eric Chatonet
Hi Muaadh,

No time to test on Win XP but just a thought: avoid unnecessary  
spaces in your formulations:
You write Plural ( 3, "Book"). Try Plural (3,"Book")

Le 15 juil. 05 à 12:23, Muaadh salih a écrit :

> My apology for the typos of yesterday message .
>  Still upon further investigation  we found that  the following  
> function:
> -----------------
>
> function plural count, textw
>   if count <> 1 then put "s" after textw
>   if count = 0 then put "no" into count
>   return  count && textw
> end plural
> -------------------
>   works perfectly on Rev 2.6 on Mac G4 with OSX 10.3.9. However it  
> does not work on Rev. 2.6 on Windows XP ( when called : Plural ( 3,  
> "Book") it returns  ( 3 s) only
> again is this a bug on the XP version ?!


Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [hidden email]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: funtions on windows

Alex Tweedly
In reply to this post by Muaadh salih
Muaadh salih wrote:

> My apology for the typos of yesterday message .
>  Still upon further investigation  we found that  the following function:
> -----------------
>
> function plural count, textw
>   if count <> 1 then put "s" after textw
>   if count = 0 then put "no" into count
>   return  count && textw
> end plural
> -------------------
>   works perfectly on Rev 2.6 on Mac G4 with OSX 10.3.9. However it
> does not work on Rev. 2.6 on Windows XP ( when called : Plural ( 3,
> "Book") it returns  ( 3 s) only
> again is this a bug on the XP version ?!

I created a new Mainstack, created a button, copied the above lines from
your email, pasted them into the button script - and it works just fine.
2.6 on Win XP

If it were me, I'd add
   "put param(1) && param(2) & cr  after msg" in as the first line of
the function
   "put textw & cr after msg"   immediately before and immediately after
the line that should change textw

and then see what I learn.  (or, as I said off-list, send me a copy of
the stack - but be sure to send it from the Windows machine in case
there was some problem copying the script from the Mac to the PC - line
endings etc.).

--
Alex Tweedly       http://www.tweedly.net



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.14/48 - Release Date: 13/07/2005

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: funtions on windows

Pat Trendler
In reply to this post by Muaadh salih
I've just tried you script on Win XP Pro Rev 2.6. It returns the correct
answer.
Plural (3, "Book") returns: 3 Books.
Plural (0, "Book") returns: no Books.
Plural (1, "Book") returns: 1 Book

Doesn't seem like a bug in Win XP

Pat
[hidden email]


>
> function plural count, textw
>   if count <> 1 then put "s" after textw
>   if count = 0 then put "no" into count
>   return  count && textw
> end plural
> -------------------
>   works perfectly on Rev 2.6 on Mac G4 with OSX 10.3.9. However it does
> not work on Rev. 2.6 on Windows XP ( when called : Plural ( 3, "Book") it
> returns  ( 3 s) only
> again is this a bug on the XP version ?!
>
> any idea ?
>
>
> Muaadh Salih
> [hidden email]
> --
>
>
>
> All the best
>
>
>
> Muaadh Salih
> SOAS
> Department of Near & Middle Eastern Studies
> Tel . +44 (0)2078984354
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.15/49 - Release Date: 14/07/2005
>
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: funtions on windows

Sarah Reichelt
In reply to this post by Muaadh salih
On 15/07/2005, at 8:25 PM, Muaadh salih wrote:

> My apology for the typos of yesterday message .
>  Still upon further investigation  we found that  the following  
> function:
> -----------------
>
> function plural count, textw
>   if count <> 1 then put "s" after textw
>   if count = 0 then put "no" into count
>   return  count && textw
> end plural
> -------------------
>   works perfectly on Rev 2.6 on Mac G4 with OSX 10.3.9. However it  
> does not work on Rev. 2.6 on Windows XP ( when called : Plural ( 3,  
> "Book") it returns  ( 3 s) only
> again is this a bug on the XP version ?!
>

I have heard of problems when there is a space between the function  
name and the opening bracket.
Try: plural(3, "Book") and see if that fixes it.

Sarah

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution