From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,51e55e05054fdc6e X-Google-Attributes: gid1164f8,public From: lionel@quark.zko.dec.com (Steve Lionel) Subject: Re: Help Replace USEROPEN Macro w/ Fortran Date: 1996/09/03 Message-ID: <50hfr7$8ua@nntpd.lkg.dec.com>#1/1 X-Deja-AN: 178188861 distribution: world sender: lionel@quark.enet.dec.com (Steve Lionel) references: <1996Aug30.122330@stsci.edu> organization: Digital Equipment Corporation, Nashua NH reply-to: lionel@quark.zko.dec.com (Steve Lionel) newsgroups: comp.sys.dec In article <1996Aug30.122330@stsci.edu>, speck@stsci.edu writes: |>I'm trying to replace an old macro USEROPEN routine with a Fortran routine. |> |>And here is the Fortran (without comments) with which I'm trying to replace it: .. |> ! set the UFO and CBT bits |> fab.fab$l_fop = fab$v_ufo .OR. fab$v_cbt Should be: fab.fab$l_fop = fab.fab$l_fop .OR. fab$m_ufo .OR. fab$m_cbt |> |> ! set the UPI bit |> fab.fab$b_shr = fab$v_upi Should be: fab.fab$b_shr = fab.fab$b_shr .OR. fab$m_upi |> |> ! open the file, return on error |> open_old_chan = sys$open(fab) |> |> if (open_old_chan .eq. 0) then Should be: if (.not. open_old_chan) then Try these corrections and see if things improve. The fab$v_ symbols are bit offset numbers, not masks. Alternatively, you could use the IBSET intrinsic. -- Steve Lionel mailto:lionel@quark.zko.dec.com Fortran Development http://www.digital.com/info/slionel.html Digital Equipment Corporation 110 Spit Brook Road, ZKO2-3/N30 Nashua, NH 03062-2698 "Free advice is worth every cent" For information on Digital Fortran, see http://www.digital.com/info/hpc/fortran/