The following are various forms of Function definitions you can use in COD scripts. In most cases, the syntax can be copied/pasted directly into a file and function properly. They should be edited for your particular use. This allows you to short cut your time by not having to experiment to figure out code syntax.
Type | Example |
---|---|
Named Function | function myfun() |
Named Function with Argument | function myfun(arg) |
Named Function with Return Value | function myfun() |
Named Function with Return Value and Argument | function myfun(arg) |