What format to save file to run?
-
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 ModuleModule showIntro()
Display “This program converts distance”
Display “in kilometers to miles. For your”
Display "reference the formula is: "
Display “miles = kilometers * 0.6214”
End ModuleModule kilometersToMiles(Real kilometers)
Declare Real miles
Set miles = kilometers * 0.6214
Display "That converts to ", miles, “miles.”
End ModuleThanks!
-
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 -
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!