Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Looking for a function that returns status of a scalar's numeric flags

by syphilis (Bishop)
on Mar 23, 2020 at 04:29 UTC ( #11114560=note: print w/replies, xml ) Need Help??


in reply to Re: Looking for a function that returns status of a scalar's numeric flags
in thread Looking for a function that returns status of a scalar's numeric flags

Search also perlapi for SvIOKp

Yes, Inline::C has always been my first goto, and I've written plenty of XSubs that reference SvIOK and friends.
But this is the first time that I've ever been interested in SvIOKp and friends, and I didn't know about them even though they're mentioned in perlapi.
Thanks for bringing them to my attention.

I had a little play with them in Inline::C last night, shortly after reading your reply, and an XSub that returned
SvIOK(sv) | SvNOK(sv) | SvIOKp(sv) | SvNOKp() | SvUOK(sv)
provided me with all that I needed.
The only problem being that Inline::C is not core :-(

Cheers,
Rob
  • Comment on Re^2: Looking for a function that returns status of a scalar's numeric flags
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11114560]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2020-06-01 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (5 votes). Check out past polls.

    Notices?