On Fri, Jan 7, 2011 at 5:38 PM, Michael Schwingen <rincew...@discworld.dascon.de> 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? -- Øyvind Harboe Can Zylin Consulting help on your project? US toll free 1-866-980-3434 / International +47 51 87 40 27 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development