Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

IsUpper

IsUpper(cString) -> lResult

Checks whether the first character is an uppercase letter.

IsUpperAdvPL
01 · OVERVIEW

Overview

The function examines only the first position and recognizes ASCII A–Z without accented letters. The official example calls IsLower, conflicting with the IsUpper contract; this adaptation explicitly calls IsUpper. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

IsUpper(cString) -> lResult

Parameters

cString
CharacterRequired

String to inspect.

Return value

Logical result for the first character.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed498()
    // The second letter does not determine the result.
    ConOut(IsUpper("Ab"))
    ConOut(IsUpper("aB"))
Return Nil
Expected result

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

BEST PRACTICES
  • Define encoding and empty-input rules for complete validation; use Lower/Upper when converting text.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. IsUpper. 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