compile_pascal
Compile Pascal source code to verify it builds and retrieve compiler messages, including errors and warnings, without executing the program. Selects an available compiler automatically or uses a specified FPC/Delphi path.
Instructions
Compile Pascal source code and return compiler output.
Use this to check if code compiles without running it. Returns compiler messages including any errors or warnings.
Args: source_code: The complete Pascal source code to compile. Should include the program/unit header (e.g., 'program Hello;'). 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compiler | No | ||
| source_code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |