Am 01/07/2011 05:44 PM, schrieb Øyvind Harboe: > On Fri, Jan 7, 2011 at 5:38 PM, Michael Schwingen > <[email protected]> wrote: >> Am 01/07/2011 05:18 PM, schrieb Øyvind Harboe: >>> The construct below has a comment to explain >>> what the following statement means => duplication. >>> >>> How about using named parameters instead? >>> >>> I think named parameters might even have a concept >>> of default values in Tcl, but offhand I don't know the syntax >>> or construct. >> Like this? >> >> proc flash_boot { {FILE "/tftpboot/actux3/u-boot.bin"} } { >> echo "writing bootloader: $FILE" >> flash write_image erase $FILE 0x50000000 bin >> } >> >> (from actux3.cfg - works fine). > Nice! > > Only can you use the "FILE" identifier at the call-site to > give context documentation of what the argument does? > > flash_boot FILE=foo > > Or some-such? I'm really no TCL expert. Google found this:
http://wiki.tcl.tk/10702 which looks useful - not sure if this works with Jim TCL. cu Michael _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
