Article View: news.software.readers
Article #63003Re: [slrn/slang] Questions :-)
From: da... John E. Davis
Date: Tue, 04 Jul 2000 00:00
Date: Tue, 04 Jul 2000 00:00
36 lines
1737 bytes
1737 bytes
On 4 Jul 2000 08:19:16 GMT, Arjan Drieman <qhpxvr@abqr0911.n2000.ay.invalid>
wrote:
>How can I retreive the current system date? I'd like to have it in
>different formats, like yyyy-mm-dd and dd-mm-yyyy. (These are quite
For this you want to use the `localtime' function together with
`sprintf'. For more information, see
http://space.mit.edu/%7Edavis/doc/slang/doc/html/slangfun.html.
>Is there any way I can refer to the user's homedirectory? ~/
>doesn't work, should I just grab it from $HOME?
You might try using the slrn `make_home_filename' function.
>Also, is there a way to have slrn reload its scripts? Quitting and
>restarting slrn is getting... kinda old. No biggie though.
Use `evalfile'. To this end, you may want to use something like:
#v+
define execute_slang ()
{
variable str;
str = read_mini ("S-Lang", "", "");
!if (strlen (str))
return;
eval (str);
}
definekey ("execute_slang", "^Kd", "group");
definekey ("execute_slang", "^Kd", "article");
#v-
Technical Details
Message-ID:
<slrn8m4bfr.sfo.davis@aluche.mit.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mailReferences:
<slrn8m37g2.fl.qhpxvr@quack.node0911.a2000.nl>Show Full Headers
Complete Article Headers
Message-ID: <slrn8m4bfr.sfo.davis@aluche.mit.edu> Subject: Re: [slrn/slang] Questions :-) Date: Tue, 04 Jul 2000 00:00:00 +0000 From: da...@space.mit.edu (John E. Davis) References: <slrn8m37g2.fl.qhpxvr@quack.node0911.a2000.nl> 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: 642337996 X-Trace: dreaderd 962735612 9442 18.75.2.45 Organization: Center for Space Research User-Agent: slrn/0.9.6.3 (Linux) Reply-To: da...@space.mit.edu Newsgroups: alt.lang.s-lang,news.software.readers