How to set the following style array??
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

How to set the following style array??

From: <jacky.meng@cosmobic.com>
Date: Mon Feb 27 2006 - 07:41:25 CET

1. In my test project, I have the following two structures in C format:

typedef structure _ST_DD {
  int a;
  double b;
} ST_DD;

typedef structure _ST_A {
  ST_DD stdd[5];
  int c;
} ST_A;

I have extended the above structures with SWIG. From SWIG, no set
method is provided for array.

I don't know how to set value for the stdd[5] member of ST_A in Tcl. (
I want use configure/cget method to set/get related members of
structure.

2. One more question:
 How to get the value of an array according to a given index/key?

 If I have the following array:
 { 0 mm
   2 nn
   3 kk
}

The command [array get] only can get key/value pairs.
How can I use command to get only the value?
Received on Sun Apr 30 02:16:35 2006