VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Apr 25 2006 - 10:15:55 CDT
- Next message: Matteo Dal Peraro: "Problem with VMD 1.8.4 on Mac OS X 10.4.6 PPC"
- Previous message: Mgr. Lubos Vrbka: "tcl question"
- In reply to: Mgr. Lubos Vrbka: "tcl question"
- Next in thread: Mgr. Lubos Vrbka: "Re: tcl question"
- Reply: Mgr. Lubos Vrbka: "Re: tcl question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Lubos,
Here's a simple example I just wrote up:
proc myproc {} {
set a {}
lappend a list
lappend a of
lappend a stuff
puts "List: $a"
set myary(A) $a
set myary(B) {another list of stuff}
puts "Array values inside proc:"
puts "[array get myary]"
return [array get myary]
}
array set foo [myproc]
puts "Array values:"
puts "[array get foo]"
On Tue, Apr 25, 2006 at 10:31:16AM +0200, Mgr. Lubos Vrbka wrote:
> hi guys,
>
> i'm trying to write some analysis scripts for vmd, however i'm now
> facing (probably simple) problem - how can i return an array of lists
> from the function i define?
>
> i know that this is tcl, not vmd question, but since i need it for my
> vmd work i thought i would ask here in the first place.
>
> googling through web unfortunately didn't help me with this issue.
>
> thank you for any hints. regards,
> lubos
>
> --
> .....................................................
> Mgr. Lubos Vrbka
>
> Center for Biomolecules and Complex Molecular Systems
> Institute of Organic Chemistry and Biochemistry
> Academy of Sciences of the Czech Republic
> Prague, Czech Republic
>
> http://www.molecular.cz/~vrbka
> .....................................................
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 Email: johns_at_ks.uiuc.edu Phone: 217-244-3349 WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
- Next message: Matteo Dal Peraro: "Problem with VMD 1.8.4 on Mac OS X 10.4.6 PPC"
- Previous message: Mgr. Lubos Vrbka: "tcl question"
- In reply to: Mgr. Lubos Vrbka: "tcl question"
- Next in thread: Mgr. Lubos Vrbka: "Re: tcl question"
- Reply: Mgr. Lubos Vrbka: "Re: tcl question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]