B4J Question Is there a function that returns the B4X type of a variable?

Discussion in 'B4J Questions' started by B4JExplorer, Mar 4, 2015.

  1. B4JExplorer

    B4JExplorer Active Member Licensed User

    Hi,

    Similar to GetType, which returns the java type that a variable belongs to, is there a similar function which will tell us the B4J type?

    So if we have a variable defined as an Int, it would return "Int", rather than "java.lang.Integer"?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Not exactly.

    You can use Is keyword:
    Code:
    If i Is Int Then

    Else if i Is Float Then
     
    B4JExplorer likes this.
  3. B4JExplorer

    B4JExplorer Active Member Licensed User

    That will work, thanks.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice