|
From: | Limbach, Hans Joerg, LAUSANNE, NRC-FS |
Subject: | [ESPResSo-devel] TCL procedures with variable calling parameters |
Date: | Fri, 26 Oct 2007 13:37:57 +0200 |
Dear all,
Here is something for the weekend...
Do you know any clever way to write a tcl procedure which has a variable parameter list?
I find it often very anoying that you one always has to look for the right order of arguments and in addition that you have to give all of them all the time.
I attached a small dummy procedure which solves this. It can take five parameters, called p1 to p5, which you can give in any order (see the script for examples). If you do not provide them, the procedure assigns them to default values.
Have a look at it and let me know what you think.
I am almost sure that this either might exist already or that somebody of you has a better idea how to handle this. In my opinion something like this would make Espresso much more user friendly.
See you,
Hanjo
<<param_test.tcl>>
Dr. Hans Jörg Limbach
Research Scientist
Nestlé Research Center
P.O. Box 44
Vers-chez-les-Blanc
CH-1000 Lausanne 26
Phone: +41 21 785 8175
Fax: +41 21 785 8554
param_test.tcl
Description: param_test.tcl
[Prev in Thread] | Current Thread | [Next in Thread] |