Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

IsAlpha

IsAlpha(cString) -> lResult

Checks whether the first character is a letter.

IsAlphaAdvPL
01 · OVERVIEW

Overview

The contract covers the first position and describes uppercase or lowercase A–Z. A letter-starting string may contain digits and symbols later. It therefore validates neither an entirely alphabetic string nor international names. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

IsAlpha(cString) -> lResult

Parameters

cString
CharacterRequired

String to analyze.

Return value

Logical result about the first character.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed494()
    // Only the first character is checked.
    ConOut(IsAlpha("A1"))
    ConOut(IsAlpha("1A"))
Return Nil
Expected result

Results: true and false. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • For whole-string validation, define the expected grammar and handle empty input, spaces and encoding explicitly.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. IsAlpha. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha