• Question

    From Nick Andre@1:229/426 to All on Fri Jun 9 19:47:57 2006
    Hi..


    Im maintaining the source code for a DOS Fido mailer that has been written in Turbo Pascal 5.5.

    What is the "ord" function?

    *Nick*

    --- Renegade v05-19.4 DOS
    * Origin: His juggling is almost hypnotic. Like a lava lamp. (1:229/426)
  • From Shawn Highfield@1:229/452 to Nick Andre on Fri Jun 9 22:58:37 2006
    Hello Nick.

    09 Jun 06 18:47, you wrote to all:

    Im maintaining the source code for a DOS Fido mailer that has been written in Turbo Pascal 5.5.
    What is the "ord" function?

    Quick search of the help:

    HOW CHARACTERS ARE INTERNALLY REPRESENTED
    Internally, most computers store characters according to the ASCII format. ASCII stands for American Standard Code for Information Interchange. Characters
    are stored according to a numbered sequence, whereby A has a value of 65 decimal, B a value of 66 etc. Several functions which manipulate characters follow.

    * CHR
    The chr or character position function returns the character associated with the ASCII value being asked, eg,
    chr( 65 ) will return the character A
    * ORD
    The ord or ordinal function returns the ASCII value of a requested character. In essence, it works backwards to the chr function. Ordinal data types are those which have a predefined, known set of values.
    Each value which follows in the set is one greater than the previous. Characters and integers are thus ordinal data types.
    ord( 'C' ) will return the value 67
    * SUCC
    The successor function determines the next value or symbol in the set, thus
    succ( 'd' ) will return e
    * PRED
    The predecessor function determines the previous value or symbol in the set, thus
    pred( 'd' ) will return c

    Shawn

    --- GoldED+/LNX 1.1.5-b20060515
    * Origin: This is NOT a default origin! (1:229/452)
  • From Scott Adams@1:112/91 to Nick Andre on Sat Jun 10 04:52:34 2006
    Quoting Nick Andre to All <=-

    Im maintaining the source code for a DOS Fido mailer that has been
    written in Turbo Pascal 5.5.

    What is the "ord" function?

    Simply returns the Ordinal value of a ordinal type. I know
    BP has a clear easy to figure out Example. I've not had
    TP loaed up but it should have online help on this. If
    not let me know and I can post a example.


    ... AD&D Mistake #08: Giving your DM a 1d100 when he rolls to-hit
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From andrew clarke@3:633/267.1 to Nick Andre on Mon Jun 26 17:37:36 2006
    Fri 2006-06-09 18:47, Nick Andre (1:229/426) wrote to All:

    What is the "ord" function?

    ord('A') = 65
    ord('B') = 66

    etc.

    http://en.wikipedia.org/wiki/ASCII

    -- mail@ozzmosis.com

    --- Msged/NT 6.1.1
    * Origin: Voodoo Dancer, Mt Eliza, Victoria, Australia (3:633/267.1)