VS:Eval: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 41: | Line 41: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<return> | <return> | ||
If the criteria is a record-field criteria, the procedure will return the value contained within the field. All other criteria return the TRUE-FALSE state of the criteria condition. </return> | If the criteria is a record-field criteria, the procedure will return the value contained within the field. All other criteria return the TRUE-FALSE state of the criteria condition. (Conrad) my tests show that the actual return values for (R IN ['Part Info']) type criteria are 0 or 1 (</return> | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<sample> | <sample> | ||
==== VectorScript ==== | |||
<code lang="pas"> | <code lang="pas"> | ||
hasRecord:=Eval(handleToObject,(R IN ['Part Info']);</code> | hasRecord:=Eval(handleToObject,(R IN ['Part Info']);</code> | ||
==== Python ==== | |||
<code lang="py"> | |||
</code> | |||
</sample> | </sample> | ||
Latest revision as of 08:27, 17 January 2014
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Evaluates whether an object meets the specified search criteria.
When used with record criteria, it will determine whether a specific record is attached to the object; if used with record-field criteria, it will return the value of the field as a REAL value.
FUNCTION Eval(
h :HANDLE;
c :CRITERIA) : REAL;
def vs.Eval(h, c): return REAL
Parameters
h HANDLE Handle of object to which the search criteria will be applied. c CRITERIA Search criteria.
Return Value
If the criteria is a record-field criteria, the procedure will return the value contained within the field. All other criteria return the TRUE-FALSE state of the criteria condition. (Conrad) my tests show that the actual return values for (R IN ['Part Info']) type criteria are 0 or 1 (
Example
VectorScript
hasRecord:=Eval(handleToObject,(R IN ['Part Info']);
Python
Version
Availability: from All Versions