Arrayread and DEC modifier issue


+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    81

    Default Arrayread and DEC modifier issue

    I have a buffer containing this string:

    Code:
    +UUSORD: 0,7
    To be sure I'm not lost in space here is the ascii scan of the buffer, that ends with a Carriage Returns 13:

    Code:
    [43][85][85][83][79][82][68][58][32][48][44][55][13]
    I'm using Arrayread to capture the last "7" that can be a number of also 2 or 3 digits

    Code:
    arrayread BufferTemp ,20,NotFound,[WAIT("+UUSORD: ",44), DEC GPRS_SocketChar]
    But it does not work and the code jumps to "NotFound"

    As I'm reading on the manual, "DEC will wait for a recognized character to begin conversion, and automatically end conversion when an unrecognized character is encountered" so it should capture the "7" and exit when the next char(13) is found.

    Can you see where I'm wrong ?

  2. #2
    Join Date
    Sep 2009
    Posts
    707

    Default Re: Arrayread and DEC modifier issue

    It is OK, that jumps to that label.
    This sequence "+UUSORD: ",44 never arrive. All characters must be in sequence for single wait instruction.

    You can do it like this
    arrayread BufferTemp ,20,NotFound,[WAIT("+UUSORD: "), WAIT(44), DEC GPRS_SocketChar]

  3. #3
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    81

    Default Re: Arrayread and DEC modifier issue

    Thank you Pedja, you are right !
    It was a very stupid mistake.
    Cheers

Similar Threads

  1. Indexing DEC modifier
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 13th December 2015, 23:12
  2. Arrayread problem
    By microcnc05 in forum General
    Replies: 4
    Last Post: - 1st October 2014, 17:35
  3. Arrayread,arraywrite
    By suded in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 13th November 2009, 09:36
  4. LCDout $FE,2, dec Days - What is dec ?
    By merc07 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th June 2009, 05:03
  5. 12F675: DEC modifier not accepted
    By jswayze in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st September 2005, 03:39

Posting Permissions

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