[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] RE: evaluate... array



Hi Ben,

You will need to do a GET to retrieve the value from the array first.  Example:

   get #day from week(2)

You can then use the resulting variable (#day) in the evaluate.  Some 
statements can reference the field within the array directly, as you are trying 
to do, but others can't.  For the ones that can't, you must first retrieve the 
field into a variable.

HTH,

Denise M. White
Sr. Software Engineer
Vicor 

--__--__--

Message: 3
From: "Ben Anderson" <pegandersonbd1@hotmail.com>
To: sqr-users@sqrug.org
Date: Thu, 10 Apr 2003 16:32:58 -0400
Subject: [sqr-users] evaluate... array
Reply-To: sqr-users@sqrug.org

<code>
  create-array
    name=week
    size=8
    field=day:number
</code>
this array gets filled with calendar month numbers like 25, 26, 27, etc.  
This much I know works because I've printed the array.  Here is my problem.
<code>
  evaluate #some_number !this number is equal to 26
    when = 26
      ! this gets evaluated just fine
      break
    when = #week.day(2) ! this number is equal to 26
      ! this doesn't get evaluated
      break
    !when = week.day(2) ! this gives me an error
    !  break
  end-evaluate
</code>

Hopefully I just have a syntax problem here.  Sorry if this is simple - I 
don't have a manual.  From looking through the archives it seems I may be 
using the array incorrectly.
Thanks,
Ben Anderson

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users