[slang-users] USIng the LIST inside of C ...
John E. Davis
davis at space.mit.edu
Mon Jun 11 12:51:11 EDT 2007
Ben Duncan <linux4ms at aim.com> wrote:
>Thanks ... would something MORE abbreviated like the following Work?
Almost. If you want a list, instead of
>get_mutlivalues( 33 ) ;
>MyList = __pop_args (_NARGS);
use:
get_mutlivalues( 33 ) ;
MyList = __pop_list (_NARGS);
or if you omit the calls to SLang_start/end_arg_list, you can just use:
MyList = {get_mutlivalues( 33 )};
Keep in mind that this method makes use of the slang stack with a
fixed size. The default stack length is 2500 and cannot currently be
changed at runtime. The code was written in such a way to easily
permit me to add such functionality but I have never needed it.
If your objects are just strings, then I encourage you to use an array
of strings. Then the stack size would not be an issue, and you will
be able to use a number of the array-based intrinsic functions such as
"where". Then you will be playing to the strengths of the
interpreter.
Good luck,
--John
More information about the slang-users-l
mailing list