Functions: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
(New page: This automatically generated page summarises the functions available in reference expressions. __TOC__ <br>Functions supported: === sqrt() === '''value = sqrt(value)''' Returns squa...)
 
No edit summary
Line 1: Line 1:
This automatically generated page summarises the functions available in reference expressions.
This automatically generated page summarises the functions available in the [[Planimate Expression Language|expression language]].used where data is needed for a parameter to a routine operation, an object delay time etc.<br>


<br> __TOC__


=== sqrt()  ===


__TOC__
'''value = sqrt(value)'''


<br>Functions supported:
Returns square root of 'value'.


=== sqrt() ===
<br>


'''value = sqrt(value)'''
=== sqr() ===


Returns square root of 'value'.
'''value = sqr(value)'''  


<br>=== sqr() ===
Returns 'value' multiplied by itself.


'''value = sqr(value)'''
<br>


Returns 'value' multiplied by itself.
=== ceil()  ===


<br>=== ceil() ===
'''value = ceil(value)'''


'''value = ceil(value)'''
Returns largest integer not greater than 'value'.


Returns largest integer not greater than 'value'.
<br>


<br>=== floor() ===
=== floor() ===


'''value = floor(value)'''
'''value = floor(value)'''  


Returns largest integer not greater than 'value'.
Returns largest integer not greater than 'value'.  


<br>=== fabs() ===
<br>  


'''value = fabs(value)'''
=== fabs() ===


Returns removes negative sign if 'value' is negative.
'''value = fabs(value)'''  


<br>=== round() ===
Returns removes negative sign if 'value' is negative.


'''value = round(value)'''
<br>


Returns the nearest integer to 'value'.
=== round()  ===


<br>=== trunc() ===
'''value = round(value)'''


'''value = trunc(value)'''
Returns the nearest integer to 'value'.


Returns 'value' with the fraction trimmed off.
<br>


<br>=== exp() ===
=== trunc() ===


'''value = exp(value)'''
'''value = trunc(value)'''  


Returns mathematical 'e' to the power of 'value'.
Returns 'value' with the fraction trimmed off.  


<br>=== ln() ===
<br>  


'''value = ln(value)'''
=== exp() ===


Returns natural logarithm of 'value'.
'''value = exp(value)'''  


<br>=== log10() ===
Returns mathematical 'e' to the power of 'value'.


'''value = log10(value)'''
<br>


Returns base 10 logarithm of 'value'.
=== ln()  ===


<br>=== pow10() ===
'''value = ln(value)'''


'''value = pow10(value)'''
Returns natural logarithm of 'value'.


Returns 10 to the power of 'value'.
<br>


<br>=== pow2() ===
=== log10() ===


'''value = pow2(value)'''
'''value = log10(value)'''  


Returns 2 to the power of 'value'.
Returns base 10 logarithm of 'value'.  


<br>=== cos() ===
<br>  


'''value = cos(value)'''
=== pow10() ===


Returns trigonometric cosine where 'value' is in radians.
'''value = pow10(value)'''  


<br>=== sin() ===
Returns 10 to the power of 'value'.


'''value = sin(value)'''
<br>


Returns trigonometric sine where 'value' is in radians.
=== pow2()  ===


<br>=== tan() ===
'''value = pow2(value)'''


'''value = tan(value)'''
Returns 2 to the power of 'value'.


Returns trigonometric tangent where 'value' is in radians.
<br>


<br>=== acos() ===
=== cos() ===


'''value = acos(value)'''
'''value = cos(value)'''  


Returns inverse of cos() function.
Returns trigonometric cosine where 'value' is in radians.  


<br>=== asin() ===
<br>  


'''value = asin(value)'''
=== sin() ===


Returns inverse of sin() function.
'''value = sin(value)'''


<br>=== atan() ===
Returns trigonometric sine where 'value' is in radians.


'''value = atan(value)'''
<br>


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


<br>=== atan2() ===
'''value = tan(value)'''


'''value = atan2(x,y)'''
Returns trigonometric tangent where 'value' is in radians.


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


<br>=== hypot() ===
=== acos() ===


'''value = hypot(x,y)'''
'''value = acos(value)'''  


Returns sqrt(x*x + y*y).
Returns inverse of cos() function.  


<br>=== min() ===
<br>  


'''value = min(val1,val2)'''
=== asin() ===


Returns minimum of 'val1' and 'val2'.
'''value = asin(value)'''  


<br>=== max() ===
Returns inverse of sin() function.


'''value = max(val1,val2)'''
<br>


Returns maximum of 'val1' and 'val2'.
=== atan()  ===


<br>=== strlen() ===
'''value = atan(value)'''


'''integer-value = strlen(string)'''
Returns inverse of tan() function. atan2 is more useful if you have an x,y point.


Returns length of 'string'.
<br>


<br>=== strleft() ===
=== atan2() ===


'''string = strleft(string,count)'''
'''value = atan2(x,y)'''  


Returns leftmost 'count' characters from 'string'.
Returns angle in radians between x axis and (x,y) on cartesian graph.  


<br>=== strmid() ===
<br>  


'''string = strmid(string,pos,count)'''
=== hypot() ===


Returns starting at 'pos' up to 'count' characters in 'string'.
'''value = hypot(x,y)'''  


<br>=== strright() ===
Returns sqrt(x*x + y*y).


'''string = strright(string,count)'''
<br>


Returns rightmost 'count' characters from 'string'.
=== min()  ===


<br>=== strreverse() ===
'''value = min(val1,val2)'''


'''string = strreverse(string)'''
Returns minimum of 'val1' and 'val2'.


Returns reversed order of characters in 'string'.
<br>


<br>=== strupper() ===
=== max() ===


'''string = strupper(string)'''
'''value = max(val1,val2)'''  


Returns 'string' converted to lowercase.
Returns maximum of 'val1' and 'val2'.  


<br>=== strlower() ===
<br>  


'''string = strlower(string)'''
=== strlen() ===


Returns 'string' converted to uppercase.
'''integer-value = strlen(string)'''  


<br>=== strcompare() ===
Returns length of 'string'.


'''integer-value = strcompare(str1,str2[,casesensitive=0])'''
<br>


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.
=== strleft()  ===


<br>=== strfind() ===
'''string = strleft(string,count)'''


'''integer-value = strfind(str1,str2[,casesensitive=0])'''
Returns leftmost 'count' characters from 'string'.


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


<br>=== strclean() ===
=== strmid() ===


'''string = strclean(string)'''
'''string = strmid(string,pos,count)'''  


Returns 'string' after leading spaces, trailing spaces, new lines and tabs have been removed. Any double quotes are made single.
Returns starting at 'pos' up to 'count' characters in 'string'.  


<br>=== strinsert() ===
<br>  


'''string = strinsert(str1,str2,pos)'''
=== strright() ===


Returns 'str1 with str2 inserted before character at position 'pos'.
'''string = strright(string,count)'''


<br>=== strdelete() ===
Returns rightmost 'count' characters from 'string'.


'''string = strdelete(string,pos,count)'''
<br>


Returns 'string' after deleteing 'count' characters starting at 'pos'.
=== strreverse()  ===


<br>=== strreplace() ===
'''string = strreverse(string)'''


'''string = strreplace(string,str1,str2[,casesensitive=0])'''
Returns reversed order of characters in 'string'.


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


<br>=== strchar() ===
=== strupper() ===


'''integer-value = strchar(string,pos)'''
'''string = strupper(string)'''  


Returns ASCII code of character at 'pos' of 'string'.
Returns 'string' converted to lowercase.  


<br>=== strasc() ===
<br>  


'''string = strasc(code)'''
=== strlower() ===


Returns a single character string containing the given 8 bit ASCII character.
'''string = strlower(string)'''


<br><br>
Returns 'string' converted to uppercase.


[[Category:Routine]]
<br>
[[Category:Data]]
 
=== 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.
 
<br>
 
=== strfind()  ===
 
'''integer-value = strfind(str1,str2[,casesensitive=0])'''
 
Returns character where 'str2' first starts in 'str1' or 0 if not found.
 
<br>
 
=== strclean()  ===
 
'''string = strclean(string)'''
 
Returns 'string' after leading spaces, trailing spaces, new lines and tabs have been removed. Any double quotes are made single.
 
<br>
 
=== strinsert()  ===
 
'''string = strinsert(str1,str2,pos)'''
 
Returns 'str1 with str2 inserted before character at position 'pos'.
 
<br>
 
=== strdelete()  ===
 
'''string = strdelete(string,pos,count)'''
 
Returns 'string' after deleteing 'count' characters starting at 'pos'.
 
<br>
 
=== 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.
 
<br>
 
=== strchar()  ===
 
'''integer-value = strchar(string,pos)'''
 
Returns ASCII code of character at 'pos' of 'string'.
 
<br>
 
=== strasc()  ===
 
'''string = strasc(code)'''
 
Returns a single character string containing the given 8 bit ASCII character.
 
[[Category:Routine]] [[Category:Data]]
 
[[Category:Editing]]

Revision as of 19:39, 31 July 2009

This automatically generated page summarises the functions available in the expression language.used where data is needed for a parameter to a routine operation, an object delay time etc.


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.