We have been dealing with large files with many columns (over 100).
In this cases, it is a pain to design the ini file - especially when extracting every column's data into variables. It was annoying to the point that we wrote a perl script to help out with that !
Why does not PI UFL support FOR loops ? ( and while loops, case statements, etc)
Large matrix data extraction like:
[Data]
Data.FILTER=C1=="\"?*\",*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*"
Tag=["\"(*)\",*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*"]
Quality=["\"*\",\"*\",\"*\",\"(*)\",*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*"]
Value1=["\"*\",\"*\",\"*\",\"*\",\"(*)\",*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*"]
Value2=["\"*\",\"*\",\"*\",\"*\",*,\"(*)\",*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*"]
Value3=["\"*\",\"*\",\"*\",\"*\",*,*,\"(*)\",*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*"]
Value4=["\"*\",\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*,*,*,*,*,*,*,*,*,*,*,*,*,*,\"(*)\",*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*"]
...
...
could easily be replaced by a single while or foreach loop:
[DATA]
counter=0
linesize = some automatic variable counting the nr of columns
While(counter < linesize){
Value = line[counter] ' where line[0] is 1st column in the line
counter +=1
}
In this case we'll also use one variable instead of 100 -> much less code, much cleaner ini files !
Please vote up if you like this idea !