Changes between Version 16 and Version 17 of Doc/panc/dml/functions
- Timestamp:
- May 15, 2007, 2:41:30 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Doc/panc/dml/functions
v16 v17 23 23 24 24 When the function is called, the DML will have the variables 'ARGC' and 'ARGV' defined. (The deprecated names 'argc' and 'argv' will also be defined.) The variable 'ARGC' contains the number of arguments passed to the function; 'ARGV' is a list containing the values of the arguments. 25 26 Note that ARGV is a standard pan list. Consequently, passing null values (intended to delete elements) to functions can have non-obvious effects. For example, the call: 27 {{{ 28 f(null); 29 }}} 30 will result is an empty ARGV list because the null value deletes the nonexistent element ARGV[0]. 25 31 26 32 The pan language does no automatic checking of the number or types of arguments. The DML block that defines the function must make all of these checks explicitly and use the error() function to emit an informative message in case of an error.