Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    get the type of a variable

    Comments & Feedback
    2
    7
    233
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      petermeisenstein F last edited by

      I am not sure if there is something like type() in fuze but maybe it would be usefull i know that it exists for example in python.

      pianofire 1 Reply Last reply Reply Quote 0
      • pianofire
        pianofire Fuze Team @petermeisenstein last edited by

        @petermeisenstein Not currently I'm afraid

        P 1 Reply Last reply Reply Quote 0
        • P
          petermeisenstein F @pianofire last edited by

          @pianofire Would be this a possible new feature?Maybe you can do it with a workaround in fuze.But i think type is sometimes usefull if you for example want to write a test.

          pianofire 1 Reply Last reply Reply Quote 0
          • pianofire
            pianofire Fuze Team @petermeisenstein last edited by

            @petermeisenstein I guess so but it is probably not a priority

            P 1 Reply Last reply Reply Quote 0
            • P
              petermeisenstein F @pianofire last edited by petermeisenstein

              @pianofire I mean i dont write much fuze code. But maybe its nice if you have much off variables hiding in your code and you cant remeber them all. So you can quick made for example
              a="Hello"
              type(a)

              or even

              if type(a)==string then print ("string") update()
              (I know writing one line code is ugly but i dont care for this example)

              pianofire 1 Reply Last reply Reply Quote 0
              • pianofire
                pianofire Fuze Team @petermeisenstein last edited by

                @petermeisenstein I know what you are saying but Fuze is generally very relaxed about types. In your example print will print any type of variable so you don't need to know what the type is in this case

                P 1 Reply Last reply Reply Quote 0
                • P
                  petermeisenstein F @pianofire last edited by

                  @pianofire Isnt it sometimes a problem that fuze is that kind of relaxed when it comes to types. I mean on the one hand fuze is for beginners and made with the ability to be as easy as possible. But i mean on the other hand it maybe is a big problem if you want to switch for example to C. I come from python who is also very relaxed about types. But i also heard that it sometimes is good to have a better control over the code. Not control in point of execution control in point of good looking code. But perhaps i am totally wrong with that.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post