Changes between Version 16 and Version 17 of Doc/panc/dml/functions


Ignore:
Timestamp:
May 15, 2007, 2:41:30 PM (17 years ago)
Author:
/O=GRID-FR/C=FR/O=CNRS/OU=LAL/CN=Charles Loomis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Doc/panc/dml/functions

    v16 v17  
    2323
    2424When 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
     26Note 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{{{
     28f(null);
     29}}}
     30will result is an empty ARGV list because the null value deletes the nonexistent element ARGV[0].   
    2531
    2632The 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.