Sign in Join
FPDoc Onlineexperiment

FilenameHasPascalExt function

In unit FileUtil

Indicates whether the specified file name uses a recognized Pascal file extension.

Declaration

pascal
function FilenameHasPascalExt(const Filename: string): Boolean

Arguments

Filename

File name examined in the routine.

Function result

True when the file name uses a recognized Pascal file extension.

Description

FilenameHasPascalExt is a Boolean function used to determine if the file name in the Filename argument uses a file extension recognized as a Pascal source code file. The CompareText routine is called to perform a case-insensitive comparison between the value in Filename and the recognized file extensions.

The return value is True when Filename has one of the following file extensions:

  • .pas
  • .pp
  • .p

The return value is False if Filename does not have a file extension, or the extension does not match the preceding values.

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