Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

Chr

Chr( <nASCII> )

Converts an ASCII code into a character.

StringsASCIIConversion
01 · OVERVIEW

Overview

Converts an ASCII code into a character. This page was created from the historical training material and structured for quick reference, with practical notes and cautious use in current Protheus environments.

02 · SYNTAX

Syntax

Chr( <nASCII> )

Parameters

nASCII
NumericRequired

Parameter used by the function. Check the Portuguese source page for the detailed original wording while this entry remains under review.

03 · PRACTICAL EXAMPLE

Building a line break

User Function ExChr()
    Local cLine := "First line" + Chr(13) + Chr(10) + "Second line"

    MsgInfo(cLine)
Return
Expected result

Chr(13)+Chr(10) represents a line break in many contexts.

BEST PRACTICES
  • Para obter o código de um caractere, use Asc().
  • Em muitos exemplos legados, Chr(13) e Chr(10) aparecem para quebras de linha.
COMMON PITFALLS
  • This entry is under review because it was structured from historical training material.
  • Confirm behavior in the Protheus/AppServer release used in your environment.

Related content

REFERENCES
  1. Programação em ADVPL Completo. Training material recorded in the official documentation, section 4.5.4, p. 45-50. Summarized, reviewed and examples adapted.
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