Comparing values in arrays

Results 1 to 2 of 2

Thread: Comparing values in arrays

  1. #1
    Join Date
    Dec 1969

    Default Comparing values in arrays

    I am trying to compare a value in an array to the same value for the next element in the array:<BR><BR>If array(1,0) = array (1,1) then<BR><BR>The values are coming from the same field and are decimals (5.76, 4.2, 3.555, etc). I keep getting the following error when I run the script:<BR><BR>Microsoft VBScript runtime error &#039 800a000d&#039 <BR>Type mismatch <BR><BR>I&#039ve tried converting both to cInt or cDbl, but the comparison doesn&#039t work. Does anyone know how I can compare the values? <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Comparing values in arrays

    It&#039s a longshot, but you could inspect the elements with the typename (variable) function, to see what the system thinks they are. It sure looks like they should be compatible.

Posting Permissions

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