Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>num_2_word() convert a numeric to a 2-byte string rlback.prg</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Num_2_word()   Convert a numeric to a 2-byte string       Rlback.prg


Syntax:        Num_2_word(<expN>)

Argument:      <expN> is the number to convert.

Returns:       A 2-byte character string in LSB, MSB order.


--------------------------------- Source Code ------------------------------

   FUNCTION NUM_2_WORD

   PARAMETERS numeric

   PRIVATE byte_string

   byte_string = CHR(numeric % 256) +;         && make LSB
                 CHR(numeric / 256)            && make MSB

   RETURN (byte_string)

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson