Chapter 10. User-defined functions

Table of Contents
Introduction
Defining a function
Function parameters
Calling a function
Scope of variables
Return value (absence of)
Error checking
Example showing scope of variables

Introduction

As of version 1.3.0, gretl contains a mechanism for defining functions in the context of a script. The syntax for this is somewhat similar to the bash shell. Details follow. At this point the mechanism is not "set in stone", and I welcome comments and suggestions. I also welcome help in shaking out any bugs.