@Pradeep:

I never really tried typecasting or the native functions because I didnt
know about them.
I actually started hardcode Javascript coding with the
Prototype/Scriptaculous frameworks so I am used to
using Prototype functions everywhere when there is a choice.


On Sat, Apr 25, 2009 at 1:52 AM, pradeep <[email protected]> wrote:

>
> Dear Ananth,
>
> you can also use..
>
> Math.abs(string); --------> to get the number
>
> which is one of the prototypes method.
>
>
> However, the beauty of the  javascript is that ....it automatically
> typecaste's the varible declared to number or string..
> depending on the usage ..
>
> could you tell me , where it went wrong (i mean typcasting) ??
>
>
>
>
>
>
>
>
>
>
> On Apr 25, 10:37 am, Ananth Raghuraman <[email protected]> wrote:
> > Thanks for pointing me to the native functions!
> > In the meantime I also found 1.8 has the Number object/function.
> > I just did Number(mynumberstring) to convert mynumberstring to a number.
> > I guess Number also accepts an object or another Number as argument..
> >
> > On Sat, Apr 25, 2009 at 12:02 AM, RobG <[email protected]> wrote:
> >
> > > On Apr 25, 2:06 am, Ananth Raghuraman <[email protected]> wrote:
> > > > Need prototype function to convert object/string/number to number.
> Please
> > > > help.
> >
> > > Without a more concise specification for what the object/string/number
> > > might be, you will end up with a large function that works for a few
> > > scenarios invented by the author and fails for anything else.
> >
> > > It doesn't make sense to have a function to convert a number to a
> > > number.
> >
> > > --
> > > Rob
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to