VS:Ord

From Vectorworks Developer
Revision as of 14:35, 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 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]]