How to detect what type a variable is?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Calvin Spealman

    #16
    Re: How to detect what type a variable is?

    On 29 Nov 2006 07:36:26 -0800, Leandro Ardissone <lardissone@gma il.comwrote:
    Hi,
    >
    I want to know what type is a variable.
    For example, I get the contents of an xml but some content is a list or
    a string, and I need to know what type it is.
    >
    Thanks
    >
    --

    >
    In nearly all cases where someone asks this question, the situation
    turns out to not call for it at all. Usually you simply aren't
    thinking in the language you are using properly. You should usually
    know what you are dealing with. If you don't, then either the
    different types of objects you might have should be interchangable or
    you should create a situation where you dont have such an ambiguality.
    Perhaps you could change the design such that you always have a list,
    even if its just a list of a single string.

    --
    Read my blog! I depend on your acceptance of my opinion! I am interesting!

    Comment

    Working...