Chr Function

ཡིག་རྟགས་ཚབ་ཡང་ལྟོས་བཅས་ཀྱི་ཡིག་རྟགས་སུ་ཕྱིར་ལོག་པ་དང་གཏན་འཁེལ་བ།

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.


Chr$ རྟེན་གྲངས་སྤྱད་ན་དམིགས་བསལ་གྱི་ཚོད་འཛིན་རིམ་ལྟར་ཉིད་གཏག་པར་ཆས་སམ་གཞན་གྱི་ཕྱིར་འདོན་ཁུངས་སུ་བསྐུན་ཐུབ་པ་དང་ད་དུང་རྟེན་གྲངས་འདི་ཉིད་ཡིག་རྟགས་ཕྲེང་བའི་མཚོན་ཚུལ་ཁྲོད་འདྲེན་རྟགས་བསྒར་འཛུད་བྱེད་ཐུབ།

Error codes:

5 ནུས་མེད་ཀྱི་བརྒྱུད་རིམ་འཁོར་སྤྱོད་

6 འདུད་པ་6 འདུད་པ་

note

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


Example:


        Sub ExampleChr
            REM དཔེ་གཞི་འདི་ཉིད་ཡིག་རྟགས་ཕྲེང་བའི་ཁྲོད་འདྲིན་རྟགས་བསྒར་འཛུད་བྱེད་པ།(ASCII ཡི་ཐང་ནི་ 34)
            MsgBox "A " + Chr$(34) + "short" + Chr(34) + " trip."
            REM གླེང་སྒྲོམ་གྱི་ཕྱིར་འདོན་ནི་ A "short" trip
            MsgBox Chr(charcode := 64) ' "@" sign
        End Sub
    

Please support us!