Chr Function

Liveras la signo kiu korespondas al la specifita signokodo.

Syntax:


      Chr[$](charcode As Integer) As String
    

Return value:

String

Parameters:

charcode: a numeric expression that represents a valid 8-bit ASCII value (0-255) or a 16-bit Unicode value. (To support expressions with a nominally negative argument like Chr(&H8000) in a backwards-compatible way, values in the range −32768 to −1 are internally mapped to the range 32768 to 65535.)

warning

When VBA compatibility mode is enabled (Option VBASupport 1), charcode is a numeric expression that represents a valid 8-bit ASCII value (0-255) only.


Uzu la funkcion Chr$ por sendi specialan regan signaron al presilo aŭ al alia eligilo. Oni povas uzi ĝin por enmeti citilojn en ĉenan esprimon.

Error codes:

5 Nevalida procedurvoko

6 Overflow

note

An overflow error will occur when VBA compatibility mode is enabled and the expression value is greater than 255.


Example:


        Sub ExampleChr
            REM Ĉi tiu ekzemplo enmetas citilojn (Askian valoron 34) en ĉenon.
            MsgBox "A " + Chr$(34) + "short" + Chr(34) + " trip."
            REM La elpresaĵo vidiĝas en la dialogo kiel: A "short" trip
            MsgBox Chr(charcode := 64) ' "@" sign
        End Sub
    

Bonvolu subteni nin!