还有CursorY在help的用法:- o7 U3 V! k* p# g, m2 e
Usage: <path>.CursorY;
. T( |6 L* f9 s r0 }/ n+ n8 ~/ I4 `" _5 p' z6 k" U7 }
The attribute CursorY sets the row in which the internal cursor is located. Note that all methods that employ ranges, such as find or max, use the current position of the cursor. Plant Simulation ignores ranges located before the current cursor position. The method starts its task beginning at the cursor position. If a method does not return the expected values, check the cursor position. The first column has the number 1. If you also want to include the customized index, set the attribute CursorY to 0.
& a0 D+ {4 X* |/ p6 c5 T7 y( w$ G4 Q$ K* Z- q. d
This attribute applies to the TableFile and the TimeSequence. 7 ^6 M# f* Z5 w
2 T& @. r; g8 t' u" g! N/ z/ PYou can assign a value of type integer.
0 P9 T7 J% E, |, s' k+ D# [8 f* Z& s$ b' j
Example: is
2 W, W- j$ O; r( ]: ~9 H" xdo* F" z% t, f* |; ?; z6 O: }
tableFile.CursorX := 1; -- starting position7 ]# ~. P) e& I: c
tableFile.CursorY := 1; -- set
3 @* R' n1 ?+ oif tableFile.find({1,*},4712) then* Z/ J( i4 d/ h K- ?' o' m( b% K: |
print "found in row:",table.CursorY;3 j. m9 A7 V) x& g, r9 N1 V& A
end;
- f$ s! W: s2 o( i% V You can also set the pointer by employing a user-defined index. For a user-defined index of data type integer, use the method setCursor!
" H$ \; W3 K, B8 d) e9 wExample: tableFile.CursorY := "urgent"; -- custom index1 S V2 J: P5 C: o! E/ ^
tableFile.CursorX := 3.1415;
) E1 {" G* @; ~4 K2 ]有人能解释一下吗??我不是看得很懂,从他的例子里面print "found in row:",table.CursorY;这里明显不是他所说的tableFile.CursorY := 1。
$ e' ?6 F0 G* h( M' @, y8 M' z我的理解就是程序对tableFile.CursorY 赋值为1了,为什么tableFile.CursorY 后面这个值会变?" t$ K# ]- G6 ?6 B
还有tableFile.CursorX := 3.1415这个为小数又是表示什么意思啊? |