Functions

From Planimate Knowledge Base
Revision as of 18:47, 31 July 2009 by Rick (talk | contribs) (New page: This automatically generated page summarises the functions available in reference expressions. __TOC__ <br>Functions supported: === sqrt() === '''value = sqrt(value)''' Returns squa...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This automatically generated page summarises the functions available in reference expressions.



Functions supported:

sqrt()

value = sqrt(value)

Returns square root of 'value'.


=== sqr() ===

value = sqr(value)

Returns 'value' multiplied by itself.


=== ceil() ===

value = ceil(value)

Returns largest integer not greater than 'value'.


=== floor() ===

value = floor(value)

Returns largest integer not greater than 'value'.


=== fabs() ===

value = fabs(value)

Returns removes negative sign if 'value' is negative.


=== round() ===

value = round(value)

Returns the nearest integer to 'value'.


=== trunc() ===

value = trunc(value)

Returns 'value' with the fraction trimmed off.


=== exp() ===

value = exp(value)

Returns mathematical 'e' to the power of 'value'.


=== ln() ===

value = ln(value)

Returns natural logarithm of 'value'.


=== log10() ===

value = log10(value)

Returns base 10 logarithm of 'value'.


=== pow10() ===

value = pow10(value)

Returns 10 to the power of 'value'.


=== pow2() ===

value = pow2(value)

Returns 2 to the power of 'value'.


=== cos() ===

value = cos(value)

Returns trigonometric cosine where 'value' is in radians.


=== sin() ===

value = sin(value)

Returns trigonometric sine where 'value' is in radians.


=== tan() ===

value = tan(value)

Returns trigonometric tangent where 'value' is in radians.


=== acos() ===

value = acos(value)

Returns inverse of cos() function.


=== asin() ===

value = asin(value)

Returns inverse of sin() function.


=== atan() ===

value = atan(value)

Returns inverse of tan() function. atan2 is more useful if you have an x,y point.


=== atan2() ===

value = atan2(x,y)

Returns angle in radians between x axis and (x,y) on cartesian graph.


=== hypot() ===

value = hypot(x,y)

Returns sqrt(x*x + y*y).


=== min() ===

value = min(val1,val2)

Returns minimum of 'val1' and 'val2'.


=== max() ===

value = max(val1,val2)

Returns maximum of 'val1' and 'val2'.


=== strlen() ===

integer-value = strlen(string)

Returns length of 'string'.


=== strleft() ===

string = strleft(string,count)

Returns leftmost 'count' characters from 'string'.


=== strmid() ===

string = strmid(string,pos,count)

Returns starting at 'pos' up to 'count' characters in 'string'.


=== strright() ===

string = strright(string,count)

Returns rightmost 'count' characters from 'string'.


=== strreverse() ===

string = strreverse(string)

Returns reversed order of characters in 'string'.


=== strupper() ===

string = strupper(string)

Returns 'string' converted to lowercase.


=== strlower() ===

string = strlower(string)

Returns 'string' converted to uppercase.


=== strcompare() ===

integer-value = strcompare(str1,str2[,casesensitive=0])

Returns 0 if 'str1' and 'str2' are the same, 1 if 'str1' has higher ascii-sort order, -1 if 'str1' has lower ascii-sort order. Default is to ignore case unless casesensitive is provided and is not zero.


=== strfind() ===

integer-value = strfind(str1,str2[,casesensitive=0])

Returns character where 'str2' first starts in 'str1' or 0 if not found.


=== strclean() ===

string = strclean(string)

Returns 'string' after leading spaces, trailing spaces, new lines and tabs have been removed. Any double quotes are made single.


=== strinsert() ===

string = strinsert(str1,str2,pos)

Returns 'str1 with str2 inserted before character at position 'pos'.


=== strdelete() ===

string = strdelete(string,pos,count)

Returns 'string' after deleteing 'count' characters starting at 'pos'.


=== strreplace() ===

string = strreplace(string,str1,str2[,casesensitive=0])

Returns 'string' after all occurances of 'str1' are replaced with 'str2'. Match is not casesensitive unless 'casesensitive' is non zero.


=== strchar() ===

integer-value = strchar(string,pos)

Returns ASCII code of character at 'pos' of 'string'.


=== strasc() ===

string = strasc(code)

Returns a single character string containing the given 8 bit ASCII character.