3
# A template demonstrating the handling of optional arguments
6
# Copyright (c) 2012 Andreas Kupries <andreas_kupries@users.sourceforge.net>
8
# # ## ### ##### ######## ############# #####################
11
package require Tcl 8.4
12
package require critcl 3.1.2
14
# # ## ### ##### ######## ############# #####################
17
critcl::license {Andreas Kupries} BSD
19
critcl::summary {Optional arguments for cproc}
22
This package implements nothing. It serves only as a
23
demonstration and template on how to declare cproc's
24
with optional arguments.
27
critcl::subject demonstration {cproc optional arguments}
29
# # ## ### ##### ######## ############# #####################
32
critcl::cproc fixed {int a int b int c int d} void {}
33
critcl::cproc optional_head {int {a 1} int {b 2} int c int d} void {}
34
critcl::cproc optional_tail {int a int b int {c 1} int {d 2}} void {}
35
critcl::cproc optional_middle {int a int {b 1} int {c 2} int d} void {}
37
# ### ### ### ######### ######### #########
39
package provide optional 1