Sockets tapset and script
Stone, Joshua I
joshua.i.stone@intel.com
Wed Nov 22 00:45:00 GMT 2006
On Tuesday, November 21, 2006 1:27 PM, David Smith wrote:
> Hmm, perhaps we need a bugzilla asking to support array
> initialization, perhaps like this:
> global xyz = { 1, 5, 10, 15 }
> global abc = { "zero", "one", "two", "three", "four" }
Remember that these are really associative arrays (à la maps in C++ STL, hashes in Perl, dictionaries in Python, etc.). So while your example implies a zero-based integer key, that's not necessarily the case.
We could treat it that missing keys are implied to count from zero, and then provide a syntax for specifying keys explicitly as well.
global sig_num_to_name = { 1:"SIGHUP", 2:"SIGINT", ...}
global sig_name_to_num = { "SIGHUP":1, "SIGINT":2, ...}
global times_table = { [1,2]:2, [5,6]:30, ...}
Josh
More information about the Systemtap
mailing list