Reading Array values into variables


Results 1 to 20 of 20

Threaded View

  1. #7
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    It's no more difficult than copying data from a single variable to another.

    X VAR BYTE
    Y VAR BYTE

    X = 3
    Y = X

    You can state X = SSMAX(23), Y = SSMAX(34), etc,,.

    Since the resulting value will be a word, then use something like this;

    SSMAX(23) contains 83h
    SSMAX(34) contains 03h

    Result VAR WORD

    Result.LowByte = SSMAX(23) ' Place 83h into lowbyte
    Result.HighByte = SSMAX(34) ' Place 03h into highbyte
    HSEROUT [DEC Result] ' Print decimal value of 0383h = 899
    Last edited by Bruce; - 28th February 2005 at 04:29.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Simple Array Demo
    By Archangel in forum Code Examples
    Replies: 5
    Last Post: - 15th February 2010, 04:46
  2. Array values changing
    By MyBuddy in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 29th October 2009, 23:13
  3. Funny PULSIN values: what is going on???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th April 2008, 08:02
  4. Seeting array variables in For-Next loop
    By bcd in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th October 2007, 07:01
  5. Putting values into an array
    By Vince in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd December 2003, 07:22

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts