VS:Ord

From Vectorworks Developer
Jump to: navigation, 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]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox