slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] S-Lang Associative Arrays in C ...


Can someone point me in the direction of using S-Lang's
associative array functions within a C program ?

I need to, in a C program, Create such an array, access it and
manipulate it.

If need be, I can do the creation inside of a S-lang program before
calling the C program.

The array needs to be a structure type thusly:

/* Each of the individual Menu Line items */
typedef struct _menuitem{
  int _menuline ;
  char _displayname [16] ;
  char _menutype [4] ;
  char _menuitemname [12] ;
} A_MenuItem ;

/* The grouping of the individual items into a
   menu grouping - limit this to 20 per menu definition
*/
struct _Completemenu {
   char _cm_heading [16] ;
   int _cm_itemactive ;
   A_MenuItem [20] ;
} ;

/* No more than 64 Menu Systems */
struct _Completemenu MenuSystem [64] ;

I want - MenuSystem - to feed to and become an associate array.
This is so that IF _menutype is "MENU", the _menuitemname is the
key/pointer to one of the "MenuSystem" allowing me to embed sub-menu's
into sub-menu's.

As always, suggestions, pointers, critique are always welcome ....

Thanks ...


--
Ben Duncan   - VersAccounting Software LLC 336 Elton Road  Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
       - Hanlon's Razor


_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]