This is not a coding help forum. So, assuming you knew that, and are asking how to help automate the process of compiling and running from within Notepad++…
There are multiple ways to automate tasks like that. In the examples below, you will have to replace the “c:\path\to\pascal\compiler.exe” with the appropriate compiler and supply appropriate command-line arguments if it requires more than just the source code.
Using Notepad++ Run > Run, type a command similar to
cmd /k "c:\path\to\pascal\compiler.exe ^"$(FULL_CURRENT_PATH)^" && ^"$(CURRENT_DIRECTORY)\$(NAME_PART).exe^""
You can hit the SAVE button to put it in the Macro menu, and optionally give it a keyboard shortcut
Using the NppExec plugin, there are a few ways:
Output to an “NppExec Console” sub-window inside the main Notepad++ window:
Select Plugins > NppExec > Execute..., and use the command
cd "$(CURRENT_DIRECTORY)"
"c:\path\to\pascal\compiler.exe" "$(FULL_CURRENT_PATH)"
"$(CURRENT_DIRECTORY)\$(NAME_PART).exe"
Output to an “NppExec Console” sub-window inside the main Notepad++ window, keeping a cmd.exe prompt active in that window:
Select Plugins > NppExec > Execute..., and use the command
cd "$(CURRENT_DIRECTORY)"
"c:\path\to\pascal\compiler.exe" "$(FULL_CURRENT_PATH)"
cmd /k "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"
Output to a separate cmd.exe window:
Select Plugins > NppExec > Execute..., and use the command
cd "$(CURRENT_DIRECTORY)"
npp_run cmd /k "c:\path\to\pascal\compiler.exe ^"$(FULL_CURRENT_PATH)^" && ^"$(CURRENT_DIRECTORY)\$(NAME_PART).exe^""
There’s probably a way to do it with the PythonScript plugin as well