Community
    • Login

    What format to save file to run?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 1.5k 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.
    • Nancy BaileyN
      Nancy Bailey
      last edited by

      I’m just doing basic modular programming for a class, what format do I save the file in to run the program? I’ve saved as html and it only displays the text, but doesn’t run the program.

      Example:

      Module Main()
      Declare Real kilometers
      Call showIntro()
      Display “Enter the distance in kilometers.”
      Input kilometers
      Call kilometersToMiles(kilometers)
      End Module

      Module showIntro()
      Display “This program converts distance”
      Display “in kilometers to miles. For your”
      Display "reference the formula is: "
      Display “miles = kilometers * 0.6214”
      End Module

      Module kilometersToMiles(Real kilometers)
      Declare Real miles
      Set miles = kilometers * 0.6214
      Display "That converts to ", miles, “miles.”
      End Module

      Thanks!

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Nancy Bailey
        last edited by

        @Nancy-Bailey

        files are always stored as bytes, not as html, py, cpp etc… these are only file extensions
        to let the os know if there is a particular application which should be used to open
        such files. Like registering txt should always be opened with npp.

        In order to run code there need to be some kind of interpreter/compiler/linker available
        for your language. What language do you use and how are codes executed natively?

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Nancy BaileyN
          Nancy Bailey
          last edited by

          In order to run code there need to be some kind of interpreter/compiler/linker available
          for your language.

          Ahhh, I suspected. I’m new to all this and was confused because in class we “ran” pseudocode programs from npp (without programming in a proper language…maybe the computers in class have a plugin or setting that I don’t on mine??) and I thought I could do the same with these modules. Thank you for your time and information!

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