Re: [Tcl-nap-users] replace missing value
Brought to you by:
dav480,
peter_turner
From: <Pet...@cs...> - 2007-03-01 23:10:17
|
Hi Guobin, I think you maybe a little confused about how nap works: Your example [nap "$variable"] value -miss -9999 Would better be written as $variable -value -miss -9999 NAP is object oriented and the $variable substitutes the name of the NAO and executes it. NAOs are object oriented and act as commands and variables. The -value and -miss are methods which modify the object behaviour. To write to a file all you need is Puts $file [$variable value -miss -9999] You do not need to quote things in these circumstances. Quotes are actually not needed in most nap expressions. The Tcl parser gets to everthing before it is parsed by NAP so you only need quotes to protect expressions which contain characters that Tcl will remove (like { ). I hope this helps Regards Peter -----Original Message----- From: tcl...@li... [mailto:tcl...@li...] On Behalf Of Fu, Guobin (CLW, Floreat) Sent: Thursday, 1 March 2007 6:29 PM To: tcl...@li... Subject: [Tcl-nap-users] replace missing value Hi, Harvey and all, We would like ti export a vailabe into a text file and changing all missing value with -9999. We know that the below command could replace the missing values in the variable into -9999,=20 [nap "$variable"] value -miss -999=20 but how to write it into textfile as we use this command: puts $file "[$variable value]" Both commands work independly, but my question is how to change the "variable in second command with the command one. Any help is appreciated. Thanks Guobin ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V _______________________________________________ Tcl-nap-users mailing list Tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcl-nap-users |