VS:Chr

From Vectorworks Developer
Revision as of 14:25, 12 August 2013 by Root (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

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

v INTEGER ASCII numeric identifier code.

Remarks

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

Example

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()

Version

Availability: from All Versions

See Also

VS Functions:

VS:Ord

VS Functions: [[VS:Ord]]