VS:Chr

From Vectorworks Developer
Jump to: navigation, 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...

Ascii lower.gif

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]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox