I thought plot[i].stem
was a string from the plot array which was contained in TPlot. Kinda really confused?
For sure that
plot[i].stem
is a string in a single TPlot item. It is just that the Plot variable is an array of TPlot. Array of TPlot <> string
The if..in construction works for enums.
So, I'll try ask again: what do you expect that the statement as written in your code would do ? If we know that then we are able to help you explain and solve whatever it is that you are trying to accomplish
No matter if you are confused or not, if we are able to present you with what you expected then it perhaps becomes more clear for you ?
edit:
otherwise we can only guess and let me try take a shot in the dark. with the statement
if plot[i].stem in plot then
you expect that the stem string is searched for in the array of tplot and if the string exist in your array of plot that the then statement is executed ?