ArrayRead question


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: ArrayRead question

    Quote Originally Posted by mister_e View Post
    Yup, safe bet

    Seems some day, we may no longer need to do like such. Few days ago, Darrel told in another thread there's a kind of lib override on the ToDo list (or in testing). Sounds like a good idea

    Darrel, forget what I said a couple of weeks ago. You need to get back to work! We need to easily be able add functionality like I'm talking about and to add our own keywords (I see some advances there already), and to be able to create something that is a semblance of real functions- something that would translate vars by position going into, and out of, a routine.
    Charles Linquist

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: ArrayRead question

    Using R5 does appear to work.

    If I have a bunch of different strings that I need to parse, and a variable exists
    right after the string - such as:

    "power -state -T system:blade[X]"

    Where "X" is a variable, the following always returns the right value.
    Code:
     
    CMD1:Command=1:ARRAYREAD  bigarray,30,CMD2,[WAIT ("power -on -T system:blade[")]:Goto GetNumber
     
     
    CMD2:Command=2:ARRAYREAD  bigarray,30,CMD3,[WAIT ("power -off -T system:blade[")]:goto GetNumber
     
     
    CMD3:Command=3:ARRAYREAD  bigarray,30,CMD4,[WAIT ("power -state -T 
    system:blade[")]:goto GetNumber
     
     
    CMD4:Command=4:ARRAYREAD  bigarray,30,ZeroOutAndRestart,[WAIT ("console -T 
    system:blade[")]:Goto GetNumber
     
     
     
     
     
    ...
     
     
    GetNumber:
     
     
    Peek R5,BladeNumber
    "BladeNumber" contains the value of "X"
    Charles Linquist

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: ArrayRead question

    HI,
    doesn't your R5 have something like ,27 or 28 or 29 plus mem location in ram ?
    don

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: ArrayRead question

    R5 has the RAM location of the NEXT item after the match. Which is the one I'm looking for. I don't care about the absolute address.
    Charles Linquist

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: ArrayRead question

    It isn't beautiful when we have access to the library code huh?

    Good job Charles
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 0

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