ord



ord
Smart pascal source code
type TEnum = (eZero, eOne, eTwo); WriteLn(Ord('A')); WriteLn(Ord('')); WriteLn(Ord(123)); WriteLn(Ord(eTwo)); WriteLn(Ord(True)); WriteLn(Ord(False)); var v: Variant; v := 456; WriteLn(Ord(v)); v := 'a'; WriteLn(Ord(v)); v := ''; WriteLn(Ord(v)); v := True; WriteLn(Ord(v)); v := False; WriteLn(Ord(v)); v := PI; try WriteLn(Ord(v)); except on e: Exception do WriteLn(e.Message); end; {<<< RESULT - CONSOLE LOG >>> ----------------------------- Errors >>>> Hint: "PI" does not match case of declaration ("Pi") [line: 25, column: 4] Result >>>> 65 0 123 2 1 0 456 97 0 1 0 3 ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}