Skip to content

Latest commit

 

History

History
62 lines (51 loc) · 985 Bytes

File metadata and controls

62 lines (51 loc) · 985 Bytes

Chr

Description

Function Chr returns the ASCII character corresponding to the specified numeric code. The ASCII code value must be between 1 and 255.

FUNCTION Chr(v : INTEGER): CHAR;
def vs.Chr(v):
    return CHAR

Parameters

Name Type Description
v INTEGER ASCII numeric identifier code.

Remarks

Here;s the ASCII table for the lower 128...

[[Image:ascii_lower.gif]]

Examples

==== VectorScript ====

PROCEDURE Example;
VAR
cnt :INTEGER;
str :STRING;
BEGIN
FOR cnt := 128 TO 255 DO BEGIN
str := Concat(str, Chr(cnt));
IF cnt MOD 32 = 0 THEN str := Concat(str, Chr(13));
END;
AlrtDialog(str);
END;
RUN(Example);

==== Python ====

def Example():
	str = ""
	for cnt in range(128, 255):
		str = str + vs.Chr(cnt)
		if cnt % 32 == 0:
			str = str + vs.Chr(13)
	vs.AlrtDialog(str)
Example()

See Also

VS Functions: Ord

Version

Availability: from All Versions

Category

  • Strings