Re: ISA number

2000-08-08 Thread Ken Fox
Peter Scott wrote: > Have often wanted a way to tell whether a scalar was a number > way to get at the SvIOK and SvNOK results would be great. SvIOK, SvNOK and "is a number" are not the same thing at all. Often numbers are strings that just look like numbers. Perl doesn't eagerly convert stuff i

Wither scalar() (was Re: ISA number)

2000-08-07 Thread Jonathan Scott Duff
On Mon, Aug 07, 2000 at 03:35:25PM -0400, John Porter wrote: > Hildo Biersma wrote: > > Having said that, it doesn't need to live in the core - and even today > > it should be relatively easy to write an XS module for this. > > It should no more NOT live in the core than, say, scalar() (or whatev

Re: ISA number

2000-08-07 Thread Peter Scott
At 08:31 PM 8/7/00 +0100, Hildo Biersma wrote: >Peter Scott wrote: > > > > Have often wanted a way to tell whether a scalar was a number, and rolling > > a regex each time seemed wasteful given that Perl knew what it was > > anyway. So a user-friendly way to get at the SvIOK and SvNOK results wou

Re: ISA number

2000-08-07 Thread John Porter
Hildo Biersma wrote: > Having said that, it doesn't need to live in the core - and even today > it should be relatively easy to write an XS module for this. It should no more NOT live in the core than, say, scalar() (or whatever scalar() might become in 6). -- John Porter

Re: ISA number

2000-08-07 Thread Dan Sugalski
At 12:27 PM 8/7/00 -0700, Peter Scott wrote: >Have often wanted a way to tell whether a scalar was a number, and rolling >a regex each time seemed wasteful given that Perl knew what it was >anyway. So a user-friendly way to get at the SvIOK and SvNOK results >would be great. The Sv?OK macros

Re: ISA number

2000-08-07 Thread John Porter
Peter Scott wrote: > Have often wanted a way to tell whether a scalar was a number, ... > So a user-friendly way to get at the SvIOK and SvNOK results would > be great. This is one of those rare proposals which can safely be assumed to be proposed, discussed, and accepted without dissent -- befo

Re: ISA number

2000-08-07 Thread Hildo Biersma
Peter Scott wrote: > > Have often wanted a way to tell whether a scalar was a number, and rolling > a regex each time seemed wasteful given that Perl knew what it was > anyway. So a user-friendly way to get at the SvIOK and SvNOK results would > be great. > > The pedestrian way would be a built

ISA number

2000-08-07 Thread Peter Scott
Have often wanted a way to tell whether a scalar was a number, and rolling a regex each time seemed wasteful given that Perl knew what it was anyway. So a user-friendly way to get at the SvIOK and SvNOK results would be great. The pedestrian way would be a builtin: isnum() or similar. But we