Hamilton LaboratoriesHamilton C shell 2012User guideLanguage reference

Procedures

Oregon Coast

Procedures
Previous | Next

Topics

Syntax
Usage
See also

Syntax

proc name ( [ namelist ] ) statement_list return [ expr ] end proc proc name proc pattern unproc namelist unproc pattern

Usage

Procedures defined by the proc statement can recursively call other procedures. They can be referred to inside an expression or as a new command, in which case any value returned is written to stdout. There is an implicit return statement at the end of every procedure definition.

The proc statement with no arguments prints a list of all the procedures that have been defined; if the argument is a name, that one procedure is listed; if the argument is a pattern, all procedures whose names match the pattern are listed.

unproc namelist, where namelist is a series of names separated by commas, discards the specified procedures. unproc pattern discards all procedures whose names match the pattern.

See also

Builtin procedures
Expression operators
Wildcard characters
Tutorial: Procedures
Tutorial: Programming constructs
Tutorial: Expressions
Tutorial: Wildcarding

Previous | Next

Getting started with Hamilton C shell

Hamilton C shell, as it first wakes up.

Getting started with Hamilton C shell

A first few commands.

You can set the screen colors to your taste.

You can set the screen colors to your taste.