run_pascal
Compile Pascal source code and execute it, returning both compiler messages and program output. Optionally specify a compiler and provide stdin input.
Instructions
Compile and execute Pascal source code, returning the program output.
Compiles the source code, runs the resulting executable, and returns both compilation messages and program output (stdout/stderr).
Args: source_code: The complete Pascal source code to compile and run. Should be a program (not a unit) with a begin..end block. compiler: Which compiler to use. Can be a type name ('fpc', 'dcc32', 'dcc64') or a full path to a specific compiler executable (e.g., 'C:\Program Files (x86)\Embarcadero\Studio\37.0\bin\dcc64.exe'). If not specified, auto-selects the best available compiler. stdin_input: Optional text input to send to the program's stdin. Useful for programs that read from input.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compiler | No | ||
| source_code | Yes | ||
| stdin_input | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |