Article View: news.software.readers
Article #34917Re: Generating vararg slrn intrinsic at run time ... ???
From: asf... Lloyd Zusman
Date: Mon, 07 Jul 1997 00:00
Date: Mon, 07 Jul 1997 00:00
51 lines
2432 bytes
2432 bytes
On 7 Jul 1997 15:10:40 GMT, Jan Hlavacek <lah...@math.ohio-state.edu> wrote:
> On 7 Jul 1997 12:43:45 GMT, Lloyd Zusman <asf...@asfast.com> wrote:
> >
> > [ ... ]
> >
> >What I'd like to do is to split this string into its components and then
> >generate the following call ...
> >
> > rsp = get_select_box_response ("Choose one:",
> > "value1", "value2", ... , "valueN",
> > N);
> >
> >I know that I can use the s-lang 'strchop' intrinsic to split the
> >string and push the components and the number of components onto the
> >stack. What I don't know how to do is to assemble the call to
> >'get_select_box_response' from these items on the stack.
>
> Did you try simply calling
>
>
> get_select_box_response ("Choose one:", strchop (my_string)); ?
>
> If this doesn't work, perhaps
>
> "Choose one:";
> strchop (my_string);
> get_select_box_response ();
>
> would do.
(sigh) Yes, both of those work. I never thought of trying the first
one because it would have been invalid in most of the other,
similar-looking languages I've used (C, C++, Java, Perl, etc.). I
shouldn't have made that assumption. And I must have typed something
wrong when I initially tried the second method.
So, thank you.
By the way, for any of you who are interested in learning more about
why this works s-lang, look in the slang/doc directory. The
'slang.tex' file talks about the structure of that language, and there
are other useful pieces of documentation there, as well. Build the
'texconv' program in that directory and then use it to convert the tex
files into ASCII if you don't have TeX available.
--
Lloyd Zusman
l...@asfast.com
Technical Details
Message-ID:
<slrn5s284s.7mg.asfast@ljz.asfast.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mailReferences:
<slrn5s1ost.u4u.asfast@ljz.asfast.net> <slrn5s21ng.4pi.lahvak+n@math.mps.ohio-state.edu>Show Full Headers
Complete Article Headers
Message-ID: <slrn5s284s.7mg.asfast@ljz.asfast.net> Subject: Re: Generating vararg slrn intrinsic at run time ... ??? Date: Mon, 07 Jul 1997 00:00:00 +0000 From: asf...@asfast.com (Lloyd Zusman) References: <slrn5s1ost.u4u.asfast@ljz.asfast.net> <slrn5s21ng.4pi.lahvak+n@math.mps.ohio-state.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail X-Deja-AN: 255285529 X-Newsgroup: news.software.readers Organization: As Fast Reply-To: l...@asfast.com (Lloyd Zusman) Newsgroups: news.software.readers,alt.lang.s-lang