From: Bardur A. <oca...@sc...> - 2004-08-31 16:13:30
|
Hi all, I've added a "set" function to the Opt module so that you can now set the value of an option programmatically. This can be quite useful if you want to provide e.g. three distinct options where value of the third can be computed from any other two. An example from network benchmarking would be: 1) number of packets, 2) packet size, and 3) total number of bytes to send. Instead of having to declaring three more variables to hold the "filled-in" values, you can just set the missing option's value directly and proceed as normal. Unfortunately it couldn't be implemented without a _tiny_ amount of breakage, but you will _only_ see this if you've implemented your own option types... and even then you only have to provide one more trivial closure for the option definition. Since almost nobody is affected by this change I decided to commit immediately. The diff is attached. Cheers, -- Bardur Arantsson <ba...@im...> <ba...@sc...> Who is General Failure, and why is he reading my disk? |