Article View: news.software.readers
Article #60084Re: [slrn/ s-lang] multiple post-hooks addind custom-headers
From: Dawn Owens-Nicholson
Date: Mon, 03 Apr 2000 00:00
Date: Mon, 03 Apr 2000 00:00
57 lines
3190 bytes
3190 bytes
Rejo Zenger wrote:
> While testing things, i also ran into another problem of which the error
> message wasn't very clear. I tried to set a variable to a string, but it
> seems to be that the string nay not exceed 255 characters. Is that
> correct?
Yes. Another way to make a larger string is to put your literals in an
array and concatenate the array elements.
> I now have almost twice the same code in my spamtraps.sl. This is because
> one of them is a followup-hook and the other a post-hook. Is there a
> variable (or whatever those things are called) which replaces the functions
> of both the "post-hook" and the "followup-hook"? Say, a merged post- and
> followup-hook?
There's no function for that but you could make a function containing the
shared code that is called by both hooks. If you're setting variables to
the same values in both, you could pass variables by reference to the
shared function:
define shared_function (a, b, c)
{
@a = 1;
@b = 2;
@c = 3;
}
define my_post_hook ()
{
variable post_a, post_b, post_c;
shared_function (&post_a, &post_b, &post_c);
}
define my_followup_hook ()
{
variable followup_a, followup_b, followup_c;
shared_function (&followup_a, &followup_b, &followup_c);
}
> These denote a slang script is following? Or more like a diff thing? In
> other words, do they have a special meaning?
They're to prevent slrn from marking up (and therefore altering) the content
of the article between those two marks. *Bold*, _underlined_ and
/italicized/ words are rendered differently than unadorned text. Check out
slrn/doc/changes.txt and the sample slrn.rc slrn/doc/slrn.rc for details on
configuring this markup.
> PS. One last question, where can i learn more about s-lang? I have
> looked for webpages on slang in relation to slrn, but i couldn't a thing
> that comes close to what is usefull for me.
Check out the doc directory of the standard S-Lang distribution from
space.mit.edu. It has documentation on S-Lang functions and an S-Lang
guide.
Technical Details
Message-ID:
<slrn8efp14.d6i.bluemoon@ux6.cso.uiuc.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<rejo.954595435m@sisterray.xs4all.nl> <slrn8eciau.bg3.bluemoon@ux6.cso.uiuc.edu> <rejo.954628360m@sisterray.xs4all.nl> <slrn8ed5rk.2hf.davis@aluche.mit.edu> <rejo.954678191m@sisterray.xs4all.nl> <slrn8ef7v9.4df.davis@aluche.mit.edu> <rejo.954708227m@sisterray.xs4all.nl>Show Full Headers
Complete Article Headers
Message-ID: <slrn8efp14.d6i.bluemoon@ux6.cso.uiuc.edu> Subject: Re: [slrn/ s-lang] multiple post-hooks addind custom-headers Date: Mon, 03 Apr 2000 00:00:00 +0000 From: bluemoon@ux6.cso.uiuc.edu (Dawn Owens-Nicholson) References: <rejo.954595435m@sisterray.xs4all.nl> <slrn8eciau.bg3.bluemoon@ux6.cso.uiuc.edu> <rejo.954628360m@sisterray.xs4all.nl> <slrn8ed5rk.2hf.davis@aluche.mit.edu> <rejo.954678191m@sisterray.xs4all.nl> <slrn8ef7v9.4df.davis@aluche.mit.edu> <rejo.954708227m@sisterray.xs4all.nl> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 605842891 X-Complaints-To: abuse@uiuc.edu X-Trace: vixen.cso.uiuc.edu 954721301 128.174.5.9 (Sun, 02 Apr 2000 19:21:41 CDT) Organization: University of Illinois at Urbana-Champaign User-Agent: slrn/0.9.6.2 (HP-UX) NNTP-Posting-Date: Sun, 02 Apr 2000 19:21:41 CDT Newsgroups: news.software.readers