PARSE# returns a Telitab set parsed from a document
PARSE#(Document$,[InpVar])
Arguments
Let Document$ contain the following data.
And there is a relation
ParseDocument# = PARSE#(Document$)
With the following information in the data slot.
Explanation
opens object "OpenWater":
Then
makes a single Telitab value of parameter "TestNr" on the basis of the filter definition:
And then
creates a table header:
and the filter definition:
seeks lines in the source document that are containing values in ALL cells corresponding with the locations marked by v's and are added to the parsed result.
And finally the object is closest using:
Creating
The combined result is:
1
"OpenWater"
{
1
"TestNr" 37816
10 "VS" "VM" "NM" "FN" "KT" "KQ" "KQ-O" "J" "WT" "ETA-O" "ETA-R"
"1" 14.0 1.878 10.347 .237 .1390 .02643 .02590 .800 .101 .683 .980
"2" 15.0 2.013 11.141 .254 .1401 .02657 .02605 .798 .099 .683 .980
"3" 16.0 2.147 12.032 .271 .1445 .02717 .02666 .789 .097 .681 .981
"4" 17.0 2.281 12.978 .288 .1500 .02792 .02742 .779 .096 .678 .982
"5" 18.0 2.415 13.959 .305 .1557 .02870 .02820 .768 .094 .675 .983
"6" 19.0 2.549 14.977 .322 .1616 .02951 .02901 .756 .093 .671 .983
}
Assume the following document to be parsed:
Speed Power Power Rate of Rate of Prop.
Revs. Revs. Diam.
kn kw hp rps rpm m
10.00 19.30 26.24 8.66 519.5 0.60 CARE
12.00 65.56 89.16 12.16 729.9 0.60 CARE
14.00 80.03 108.84 13.33 799.7 0.60 CARE
16.00 92.31 125.54 14.36 861.5 0.60
18.00 104.07 141.53 15.32 919.5 0.60
20.00 118.47 161.12 16.39 983.2 0.60
22.00 136.15 185.16 17.51 1050.3 0.60
24.00 159.04 216.30 18.74 1124.3 0.60
26.00 187.54 255.05 20.08 1204.6 0.60
28.00 222.11 302.07 21.52 1291.4 0.60
30.00 265.46 361.02 23.09 1385.4 0.60 CARE
32.00 322.98 439.25 24.87 1492.4 0.60 CARE
34.00 395.97 538.51 26.85 1610.9 0.60 CARE
You see that note CARE behind the data. The only way to parse this data is to use the "aa" mask:
@FILTER
@TABLE(VS_kts PD PD_hp N_s N DIAM Warning$)
vvvvvvvvvv vvvvvvvvvvv vvvvvvvvvvv vvvvvvvvv vvvvvvvvv vvvvvvvv aaaaaaa
@ENDFILTER
Would you have used the "ss" mask instead of the "aa" mask the result would be:
0
7 "VS_kts" "PD" "PD_hp" "N_s" "N" "DIAM" "Warning$"
"1" 10.00 19.30 26.24 8.66 519.5 0.60 CARE
"2" 12.00 65.56 89.16 12.16 729.9 0.60 CARE
"3" 14.00 80.03 108.84 13.33 799.7 0.60 CARE
"11" 30.00 265.46 361.02 23.09 1385.4 0.60 CARE
"12" 32.00 322.98 439.25 24.87 1492.4 0.60 CARE
"13" 34.00 395.97 538.51 26.85 1610.9 0.60 CARE
With "aa" it will be:
0
7 "VS_kts" "PD" "PD_hp" "N_s" "N" "DIAM" "Warning$"
"1" 10.00 19.30 26.24 8.66 519.5 0.60 CARE
"2" 12.00 65.56 89.16 12.16 729.9 0.60 CARE
"3" 14.00 80.03 108.84 13.33 799.7 0.60 CARE
"4" 16.00 92.31 125.54 14.36 861.5 0.60 -999999
"5" 18.00 104.07 141.53 15.32 919.5 0.60 -999999
"6" 20.00 118.47 161.12 16.39 983.2 0.60 -999999
"7" 22.00 136.15 185.16 17.51 1050.3 0.60 -999999
"8" 24.00 159.04 216.30 18.74 1124.3 0.60 -999999
"9" 26.00 187.54 255.05 20.08 1204.6 0.60 -999999
"10" 28.00 222.11 302.07 21.52 1291.4 0.60 -999999
"11" 30.00 265.46 361.02 23.09 1385.4 0.60 CARE
"12" 32.00 322.98 439.25 24.87 1492.4 0.60 CARE
"13" 34.00 395.97 538.51 26.85 1610.9 0.60 CARE
In which -999999 stands for PENDING values.
Quick links: Function overview | Attribute overview | Constants overview | Dimensions overview