is it possible to index dsm arrays using a variable? i have tried many
variations without luck and could not find anything from the docs.

  set($a[0] = 1);
  set($a[1] = 2);
  for ($n in $a) {
    info("n is $n");
  };

  set($m = $a[0]);
  info("m is $m");

  set($i = 0);
  set($m = $a[$i]);
  info("m is $m");

produces:

Nov 24 14:58:53 lohi sems[21000]: [#7f5361f16700] [execute, 
DSMCoreModule.cpp:634] INFO:  FSM: 'n is 1'
Nov 24 14:58:53 lohi sems[21000]: [#7f5361f16700] [execute, 
DSMCoreModule.cpp:634] INFO:  FSM: 'n is 2'
Nov 24 14:58:53 lohi sems[21000]: [#7f5361f16700] [execute, 
DSMCoreModule.cpp:634] INFO:  FSM: 'm is 1'
Nov 24 14:58:53 lohi sems[21000]: [#7f5361f16700] [execute, 
DSMCoreModule.cpp:634] INFO:  FSM: 'm is '

how to write

  set($i = 0);
  set($m = $a[$i]);

so that $m would contain value of $a[0]?

-- juha
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to