Sign in Join
FPDoc Onlineexperiment

AddProgramExtension function

In unit fpMkUnit

Adds appropriate extension to program name

Declaration

pascal
function AddProgramExtension(const ExecutableName: string; AOS: TOS)
: string

Arguments

ExecutableName

Base executable name to extend

AOS

Target operating system for extension

Function result

Program name with platform-appropriate extension

Description

AddProgramExtension adds the platform-appropriate file extension to an executable program name. This function ensures proper executable naming conventions for different operating systems.

The function appends extensions such as .exe for Windows or leaves names unchanged for Unix-like systems, ensuring correct executable file naming for the target platform.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.