Run Pascal


#1

How do i get Atom to run Pascal code?


#2

Atom uses packages to interact with external interpreters and compilers in order to run code. All Atom does is write a command-line instruction and pass it along. You need script or a similar package, as well as a Pascal compiler.


#3

Yeah but Script does not support Pascal by default, and i don’t know how to manually get Pascal code to run using the Script package, would you care to explain how to do it please? (i’m very beginner when it comes to programming, i actually need to learn Pascal for college, i’m using Pascalzim right now but i don’t like the interface).


#4

I can tell you what to put into script if you can tell me how to run Pascal from the command line.


#5

Hi.

Using Atom is like dating a beautiful girl. You have to put in some effort (read: research) to make it work. But you do not need to date a beautiful girl when searching for a companion.

As alternative you can web search Lazarus and free pascal. Those guys are dedicated to Pascal and to their IDE. I am hopeful that their community would be very helpful for making your studies go smoother.

Then there is the half-brother of Atom from Microsoft - Visual Studio Code.

Back to Atom
To make Atom work for you, you need:

  1. Atom base installation. {done}
  2. Add-on Package to make syntax highlighting possible. {done}
  3. Add-on Package as middle man between Atom and the compiler. {done}
  4. The compiler. {TODO}
  5. Make changes to middle man Package to work with the compiler. {TODO}
  6. Test and alter as required. {TODO}
  7. Use it. {give feedback to developers to make things better}

@DamnedScholar already given you good information especially the link to source a compiler.

The scrit add-on only links Atom with the compiler. The compiler you need to source, is an application that can run on (command) prompt. It is like writing the code as a text file in MS Word and then go to the prompt and compile & run the text file. If you are not able to source the compiler and get it running on your PC, then you should not consider using Atom.

If you do get the compiler running - Tell @DamnedScholar what the commands is that you use to (a) compile and (b) run the code. He will help you change script to do those steps for you.

Best regards,
  dP


#6

Have a look at build-fpc to compile with Free Pascal


#7

Sir, your package looks to be a good suggestion.

Respectfully said - my quick glance makes me doubt something.

Are the instructions contained within your package enough to help a guy who has no experience in using Atom / Pascal? If this had to explain to your school going nephew, would it help him without your (further) help?


#8

No eligible build target.
No configuration to build this project exists.
Hide Stack Trace
No eligible build target.: No configuration to build this project exists.
at file:///C:/Users/Adm/.atom/packages/build/lib/build.js:113:15

:thinking: ?


#9

The package is only a provider for the build package, so I’d refer to its instructions.

I’d expect your nephew to have basic knowledge of core Atom concepts, e.g. how to use the command palette. The default command Free Pascal: Compile is equivalent to running fsc yourFile.pas, additional compiler flags can be passed in the package settings.


#10

I can’t help you with this specifically, but make sure the following is true:

There are plenty of issue regarding this on the build repository, maybe that helps: