VS:Ord

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Description

Function Ord returns the corresponding ASCII number of the specified character value. Parameter Ord specifies the character.

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

Parameters

v CHAR ASCII character.

Remarks

The encoding used is Apple MacRoman. This leads to a number of troubles if you are on Windows and use characters above ASCII 128.

Example

VectorScript

PROCEDURE Main;
VAR
str :STRING;
cnt :INTEGER;
BEGIN
str := GetText(FSActLayer);
FOR cnt := 1 TO Len(str) DO
AlrtDialog(Concat(Ord(Copy(str, cnt, 1))));
END;
RUN(Main);

Python


Version

Availability: from All Versions

See Also

VS Functions:

VS:Chr

VS Functions: [[VS:Chr]]