in reply to Need some wisdom on strings to numbers
This is an easy way to check if a scalar is a number or a string, the fact that &nding a number to its complement (or exclusive ORing of a scalar to itslef using the binary ^ operator) would give you zero if the scalar has a number can be a good distinction. However, there are some catches you have to be aware of, read How to check if a scalar value is numeric or string? for a wholesome discussion on this with examples included.
|
|---|