title: Syntax Error Token Value after Numerical comparison of Associativke Array Elements
body: <p>ISSUE:  Attempting to compare the values of the same array with the "next" or following value in order to obtain the "max" of the total values that are in the array. After the "max_val" is obtained I would then like ot display the value at the end of the program.
  After running the the following code an error msg is displayed (at bottom)  </p>
  
  <pre><code>function data_rank ()
  {
          printf '\n'
          #count=0
          # count variable to check the current state of loop
  
          # loop cycles through current values for comparison
          for i in "${RA[@]}"
          do
                  #let count=count+1
                  curr_val=$i
  
                  for x in "${RA[@]:1}"
                  do
                          # error toke value considered tobe the nxt_val
                          # need to change the
  
                          nxt_val=$x # next value use array comparison
  
                          if (( $curr_val -gt $nxt_val ))
                          then
                                  max_val=$curr_val
                                  printf " CURR.MAX: $max_val"
  
                          elif (( $curr_val -lt $nxt_val ))
                          then
                                  max_val=$nxt_val
                                  printf "CURR.MAX: $max_val"
                          else
                                  max_val=$curr_val
                                  printf "CUR.MAX: $max_val"
                          fi
                  done
          done
  }
  </code></pre>
  
  <p>OBJECTIVE: Obtain the max, min,and avg values based on the array provided by the user. </p>
  
  <pre><code>((: 8757 -gt 17514 : syntax error in expression (error token is "XXXXX ") 
  </code></pre>
  
  <p>Where the "X's" are numbers used for comparison.</p>