Dear All,
From the RTF spec:
\abshN -- N is the height of the frame in twips. A positive number indicates the minimum height of the frame, and a negative number indicates the exact height of the frame. A value of zero indicates that the height of the frame adjusts to the contents of the frame. This is the default for frames where no height is given.have you ever seen this sort of thing in an API where a positive value in a parameter means one thing and negative value means something very different?
I'm pretty sure I have, but I don't remember where. It may have been another MSAPI, which would confirm this example as an instance of MSThinking 1.0.Have you ever seen this sort of thing in an API where a positive value in a parameter means one thing and negative value means something very different?
This seems like the kind of trickery a newbie C hacker would use in the days when they're being too clever by half. Especially something that would have been common in the early 1990s when C was starting to catch on big time in the microcomputing world.
Thankfully, those days don't last very long (or there would be all sorts of other trickery hanging on the boolean nature of the sign bit.) Unfortunately, sometimes those tricks make it into public APIs.
So, -atime 5 means accessed 5 days ago, -atime -5 means accessed less than 5 days ago, and -atime +5 means accessed more than 5 days ago. Most of the time, you want a signed version. (How often do you want to find files used exactly 37 days ago, and be sure it wasn't 36 or 38?)
I can give you two examples in Perl.have you ever seen this sort of thing in an API where a positive value in a parameter means one thing and negative value means something very different?
Result:$s = join "", "A".. "Z";
print substr($s, 10, -10);
KLMNOP