HP3000-L Archives

June 1999, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Glenn Cole <[log in to unmask]>
Reply To:
Date:
Wed, 16 Jun 1999 11:52:05 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
Abraham Zwygart writes:

>Tim Ericson wrote:
[snip]
>>     IF (FINFO ("!file","FOPTIONS") ) BAND 2 = 2 THEN
>>         ECHO !file is TEMPORARY
>>     ELSEIF (FINFO ("!file","FOPTIONS") ) BAND 1 = 1 THEN
>>         ECHO !file is PERMANENT
[snip]

>Yes the above command works.  I would like to know how you came up with
>'BAND 2 = 2'?
>I came up with the following:
>
>IF ( FINFO ("!FILE","FOPTIONS") ) = 1026 THEN
>    ECHO TEMP
>ELSEIF ( FINFO ("!FILE","FOPTIONS") ) = 5 THEN
>    ECHO FIXED
>ENDIF

Tim et al (properly) checked only the specific bits in the file's FOPTIONS
that related to whether the file was perm or temp.

1026 = 1024 + 2 = 2^10 + 2^1

If we number the bits such that the least significant (i.e., right-most)
bit is zero, then bit 10 (from 2^10 above) is...disallow :FILE equations??
Am I counting correctly??  Why would that be turned on??

That's why they single out only the two low-order bits.

But that's also why I prefer the dangerous and less efficient :FILE
equation technique (where the "danger" is the possibility of replacing
an existing :FILE equation).  The code is much more obvious.

--Glenn

.......................................................................

Item Subject: cc:Mail Text

ATOM RSS1 RSS2