DATATYPE(1,)
, like DATATYPE(1)
, would return NUM
. You can include any number of trailing commas; they are ignored. If there are actual parameters, the default values apply.
POS("a","Haystack",3)
is equivalent to "Haystack"~POS("a",3)
.
>>-ABBREV(information,info--+---------+--)--------------------->< +-,length-+
1
if info is equal to the leading characters of information and the length of info is not less than length. It returns 0
if either of these conditions is not met.
Example 7.4. Builtin function ABBREV examples
ABBREV("Print","Pri") -> 1 ABBREV("PRINT","Pri") -> 0 ABBREV("PRINT","PRI",4) -> 0 ABBREV("PRINT","PRY") -> 0 ABBREV("PRINT","") -> 1 ABBREV("PRINT","",1) -> 0
Note
0
, or the default, is used. This allows a default keyword to be selected automatically if desired; for example:
Example 7.5. Builtin function ABBREV example
say "Enter option:"; pull option . select /* keyword1 is to be the default */ when abbrev("keyword1",option) then ... when abbrev("keyword2",option) then ... ... otherwise nop; end;