I just updated to the latest CR1000X OS 8.4 (previous version not available) and several methods seem to have changed but I cannot find it in the OS change logs. For example, an operational script that has been working for some time used SplitStr as follows:
numparms = SplitStr(stream, item(), " ")
The declarations for the above are:
Dim item(41) As String * 20, stream as String * 500, numparms as Long
Previously, SplitStr returned the number of filter strings found which was used as the basis for the number of passes through a for-next loop. Now, the "numparms =" causes a compiler error and the destination array and string to be split positions are reversed in addition to additional parameters being required. I have rewritten the method as:
SplitStr(item(),stream," ",41,5) per the editor help: SplitStr ( SplitResult, SearchString, FilterString, NumSplit, SplitOption )
This works but there are not always NumSplit values resulting from the splitting.
A sample value for stream is "wind_speed 4.5 wind_direction 271 humidity 73 air_temperature 1.6" so I would expect numparms to equal 7 before the change.
So the question is what is the best, most efficient way to determine how many splits were found in order to assign a value to "numparms" for the loop to work?
Thanks in advance!
More info. The previous OS version should have been 8.2.1.