Article View: news.software.readers
Article #115360Re: [slrn] s-lang macro question - buffer underflow
From: J.B. Nicholson-Owens
Date: Sun, 01 Dec 2002 03:15
Date: Sun, 01 Dec 2002 03:15
63 lines
3054 bytes
3054 bytes
Ciro wrote:
> fromaddr += localtime();
>
> [...] but when I try posting [...] I get an error about a
> stack underflow [...]
Check out the documentation for localtime(); there are two relevant syntax
errors in your code for you to fix: localtime() takes an argument you're not
supplying or pushing onto the stack ahead of time, and localtime() returns a
structure, not a string.
If you are using jed in emacs mode, type "ESC ? f localtime" (3 keystrokes
and a word) and a jed buffer should open and show you the most up-to-date
documentation for localtime. If you're not using jed, read on.
localtime
SYNOPSIS
Break down a time in seconds to local timezone
USAGE
Struct_Type localtime (Long_Type secs)
DESCRIPTION
The `localtime' function takes a parameter `secs'
representing the number of seconds since 00:00:00, January 1 1970
UTC and returns a structure containing information about `secs'
in the local timezone. The structure contains the following
`Int_Type' fields:
`tm_sec' The number of seconds after the minute, normally
in the range 0 to 59, but can be up to 61 to allow for
leap seconds.
`tm_min' The number of minutes after the hour, in the
range 0 to 59.
`tm_hour' The number of hours past midnight, in the range
0 to 23.
`tm_mday' The day of the month, in the range 1 to 31.
`tm_mon' The number of months since January, in the range
0 to 11.
`tm_year' The number of years since 1900.
`tm_wday' The number of days since Sunday, in the range 0
to 6.
`tm_yday' The number of days since January 1, in the
range 0 to 365.
`tm_isdst' A flag that indicates whether daylight saving
time is in effect at the time described. The value is
positive if daylight saving time is in effect, zero if it
is not, and negative if the information is not available.
SEE ALSO
gmtime, _time, ctime
[Obtained from file /usr/local/doc/slang/slangfun.txt]
-----------------------------------
Technical Details
Message-ID:
<slrnauj0rq.5go.jbn@forestfield.org>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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mailReferences:
<YreG9.8059$yy.1086392@newsread1.prod.itd.earthlink.net>Show Full Headers
Complete Article Headers
Message-ID: <slrnauj0rq.5go.jbn@forestfield.org> Subject: Re: [slrn] s-lang macro question - buffer underflow Date: Sun, 01 Dec 2002 03:15:41 +0000 From: "J.B. Nicholson-Owens" <jbn@forestfield.org> References: <YreG9.8059$yy.1086392@newsread1.prod.itd.earthlink.net> 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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail Newsgroups: news.software.readers Organization: Forest Field OmniMedia Lines: 62 NNTP-Posting-Host: forestfield.org (208.216.67.173) X-Trace: fu-berlin.de 1038712541 27193649 208.216.67.173 (16 [35848]) Mail-Copies-To: nobody User-Agent: slrn/0.9.7.4pl1 (Linux)