I need to create a loop that will compare each number in an array to a stored variable (that starts with 0) to determine which value is higher, replace that stored variable if the new array value is higher, and then display the stored value. Any help would be appreciated.

I'm not sure what you mean by "starts with 0", and I'm curious what "replace that stored variable" is all about (since variables don't survive from frame to frame). More detail about what you're trying to do would be helpful (more so than how you're trying to do it).

Thanks for the response. With some help I've created a visible number that displays each number of an array in succession. The array is a comma delimited list pasted into a text layer. The visible number is an expression in a second layer that displays each number. To look at it the number goes up and down like a car digital speedometer. What I need to do now is create a second expression that keeps track of and dislays each highest number as it succeeds. Ex: Array #1 is higher than 2 so 1 displays. 3 is higher that 2, but lower than 1 so 1 remains...etc. your help is appreciated.

i was writing my reply as you were writing yours... but i don't think my original reply will work for what you want.

as dan mentioned earlier, you can't pass (or store) a variable from frame to frame, so i think you'd need to re-parse the array with the same timing as how you are parsing it in the fluctuating text layer, and display the greatest value up to that point in time...

so say your values are changing every frame, you could use an expression similar to the one i provided to count through your array for every frame up to the current frame and determine the max value to that point.

we could do an expression like that for you, but it would help to know how the values are currently changing

Folks, thanks for your help... both operations you all successfully provide the highest number in the list. That is not exactly what I'm shooting for. Below is the code I have that prints to screen (for lack of the correct terminology) the numbers of my array at a rate of 5 times per second (every sixth frame/30 fps).

see code

So... what needs to happen is an incremental comparison with the highest number up to that point being displayed.