Page 1 of 1

xpfSizeOf vs EXISTS

Posted: Tue Aug 27, 2019 9:38 am
by azo
Function xpfSizeOf was introduces quite long time ago.
Before standard EXISTS function was used.
According to standard EXISTS requires input value to be NOT empty.

Before EXISTS was used in the following way

Code: Select all

doc_rel_list := get_representing_product_relationship('urn:plcs:rdl:missing-std:Document_dependency_relationship', relating_doc.doc, related_doc.doc);
IF EXISTS(doc_rel_list) AND (EXISTS(doc_rel_list) > 0) THEN
   ...
Condition from above can be simplified by using xpfSizeOf

Code: Select all

IF xpfSizeOf(doc_rel_list) > 0 THEN
   ...

Re: xpfSizeOf vs EXISTS

Posted: Wed Sep 04, 2019 6:40 am
by Ernest
The first case should be like this:
IF EXISTS(doc_rel_list) AND (SIZEOF(doc_rel_list) > 0) THEN