lang_ref_functions.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type"
  4. content="text/html; charset=iso-8859-1">
  5. <title>Language Reference - Functions</title>
  6. <link rel="stylesheet" href="lang_ref.css" type="text/css">
  7. </head>
  8. <body><br>
  9. &nbsp;<span class="Command">&nbsp;Functions&nbsp;</span>
  10. <blockquote>
  11. <p> A function is defined using the 'Function' keyword: </p>
  12. <blockquote>
  13. <p><i>Function {funcname}{typetag}( {params} ) <br>
  14. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{statements} <br>
  15. End Function </i></p>
  16. <p>{<b>funcname</b>} is any valid identifier. </p>
  17. <p> {<b>typetag</b>} is the type of value returned by the function. If {typetag}
  18. is omitted, the function returns an integer value by default. </p>
  19. <p> {<b>params</b>} is a comma separated list of variables which is passed
  20. to the function when it is called, each parameter may be given an optional
  21. type tag. Parameters are always local. </p>
  22. </blockquote>
  23. <p> A function may use the '<b>Return</b>' statement to return a result. Return
  24. may optionally be followed by an expression. </p>
  25. <p> If there is no Return statement, or a Return without any expression is used,
  26. the function returns a default value of 0 for numeric functions, an empty
  27. string ("") for string functions, or a 'Null' object for custom type functions.
  28. </p>
  29. <p>&nbsp; </p>
  30. </blockquote>
  31. </body>
  32. </html>