VA FileMan V. 22.0 Getting Started HTML Manual Banner


Main Chapter Getting Started Manual Programmer Manual

VA FileMan Functions


  1. $P(string,"delimiter",n)

  2. $P(string,"delimiter",n1,n2)

  3. $P(string,"delimiter")

string is a string expression.

delimiter is a character (or characters) or an expression yielding a character (or characters) that divides the string into pieces.

n, n1, and n2 are positive integers or expressions evaluating to positive integers.

Use: The function returns a part of string. String is divided into substrings by delimiter. In the first format, the nth substring is returned. In the second format, the substrings starting with n1 and ending with n2 are returned. The delimiters between those substrings are also returned. In the third format, the first substring (i.e., the one preceding the first occurrence of delimiter) is returned.

$P("McMillan,John",",",2)=> John

$P(PHONE,"-",2,3)=> 943-2109

$P(PHONE,"-")=> 510


Reviewed/Updated: March 4, 2007