11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DCOUNT<br />

Syntax<br />

DCOUNT(str,delim)<br />

Description<br />

The <strong>UniBasic</strong> DCOUNT function returns the number of substrings delimited by<br />

delim in a string. If str is an empty string, UniData returns 0. If str contains data but<br />

no delimiter, UniData returns 1. DCOUNT supports multibyte languages.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Paramete<br />

r Description<br />

Examples<br />

In the following example, the program segment finds three occurrences of the value<br />

mark and prints 3:<br />

STR = 123:@VM:456:@VM:789<br />

SUBS = DCOUNT(STR,@VM)<br />

PRINT SUBS<br />

In the next example, the program segment prints 1 because no delimiter is found in<br />

the string:<br />

STR = 123<br />

DCOUNT(STR,@VM)<br />

PRINT SUBS<br />

1-191 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

str Specifies the string to search for occurrences of substrings delimited by delim.<br />

delim Specifies the delimiter to use in searching str.<br />

DCOUNT Parameters

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!