HISE Logo Forum
    • Categories
    • Register
    • Login

    Daydreams of Scope

    Scheduled Pinned Locked Moved Solved Scripting
    3 Posts 2 Posters 140 Views
    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.
    • clevername27C
      clevername27
      last edited by

      Does anyone know…

      :question_mark: Is there an situation where there is a difference between writing code directly interface.js, and within a file that's included in interface.js?

      :question_mark: What is the difference (in scope) between declaring a variable as const and global? (I'm guessing that only the global variables can be accessed in the real-time thread, etc.)

      :question_mark: What is the difference between const and const var?

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @clevername27
        last edited by d.healey

        @clevername27 said in Daydreams of Scope:

        Is there an situation where there is a difference between writing code directly interface.js, and within a file that's included in interface.js?

        This bug - https://forum.hise.audio/topic/10929/console-blink-not-blinking/17 -apart from that I don't think so.

        @clevername27 said in Daydreams of Scope:

        What is the difference (in scope) between declaring a variable as const and global? (I'm guessing that only the global variables can be accessed in the real-time thread, etc.)

        A const variable is one that's value cannot be changed after declaration.
        A global variable can be accessed from all script processors, not just the one in which it was created - and they make code messy so avoid them if you can (although some people, cough cough... Aaron, likes them) :)

        @clevername27 said in Daydreams of Scope:

        ❓ What is the difference between const and const var?

        The second one takes up more space on the screen. Other than that no difference. My OCD makes me remove the var.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        clevername27C 1 Reply Last reply Reply Quote 1
        • clevername27C
          clevername27 @d.healey
          last edited by

          @d-healey Thank you as always.

          1 Reply Last reply Reply Quote 0
          • clevername27C clevername27 has marked this topic as solved on
          • First post
            Last post

          13

          Online

          1.7k

          Users

          11.8k

          Topics

          102.6k

          Posts