• Login
Community
  • Login

How to run code

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
6 Posts 4 Posters 27.6k 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.
  • R
    Robbie Koble
    last edited by May 10, 2016, 9:26 PM

    I am but a lowly amateur, so I was wondering how to run the code I have written. Is there a built-in function, or do I need to use an online compiler?

    1 Reply Last reply Reply Quote 0
    • D
      dail
      last edited by dail May 11, 2016, 12:16 PM May 11, 2016, 12:16 PM

      Notepad++ is just an editor. It doesn’t come with any type of compilers or interpreters. So you will have to get your own for whatever language you are using.

      That being said there plugins you can use to help run compilers/interpreters from Notepad++, but it tends to not be as useful as a full IDE that is made to handle a specific language. But it really depends on the language you are using.

      1 Reply Last reply Reply Quote 0
      • R
        Robbie Koble
        last edited by May 11, 2016, 2:53 PM

        I do believe I am attempting to run .js files. Is Node.js useful for this?

        1 Reply Last reply Reply Quote 0
        • D
          dail
          last edited by dail May 11, 2016, 4:11 PM May 11, 2016, 4:11 PM

          No clue personally. The little bit of JavaScript I’ve wrote personally I just load it up from an HTML page in a browser.

          1 Reply Last reply Reply Quote 0
          • J
            Jan Schreiber
            last edited by May 12, 2016, 6:56 PM

            @Robbie-Koble The top tool (IMHO) for running stuff from inside Notepad++ is the NppExec plugin. You can download it with the Plugin Manager. It enables you to run compilers, interpreters, linters and pretty much everything you’ll ever need from inside Notepad++.

            Also, it is vital that we understand what you are trying to achieve for us to give useful advice.

            There are two (related, but still vastly different) types of files that have a .js extension: (a) MS JScript files that can be executed directly by the Windows Scripting Host (WSH), (b) JavaScript files that are usually executed client-side inside a web browser. I am not aware of any way to run JavaScript without a browser, but I might be wrong here.

            If you want to learn JavaScript, there are a lot of free courses around these days, personally I recommend freeCodeCamp.

            1 Reply Last reply Reply Quote 0
            • J
              Jon Blanchard
              last edited by May 12, 2016, 7:53 PM

              Go to the Rhino Web Site , download the Rhino interpreter and follow the instructions for running it within the OS window. You can run little snippets, define and run functions and see the output immediately; kind of basic and lacking special environment vars that might be available in a browser, but still a valuable tool.

              The other option that I can think of is to create a template HTML doc to test Javascript in, that will take inputs and generate output (check out W3 Schools and their Javascript section for examples of how they do it).

              1 Reply Last reply Reply Quote 0
              1 out of 6
              • First post
                1/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors