Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!decvax!decwrl!ucbvax!"Olivier From: "Olivier@ucbvax.UUCP Newsgroups: mod.computers.vax Subject: RE: How does (vms) help use ? Message-ID: <8606181053.AA10776@ucbvax.Berkeley.EDU> Date: Wed, 18-Jun-86 04:02:37 EDT Article-I.D.: ucbvax.8606181053.AA10776 Posted: Wed Jun 18 04:02:37 1986 Date-Received: Fri, 20-Jun-86 00:15:59 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 84 Approved: info-vax@sri-kl.arpa > The vms help program uses the ? (question-mark) key in a special way. > Immediately after the ? key is pressed, help proceeds to display the > current help page, which usually has an index of help subtopics. Can > someone show me how a program could do that, set up certain keys to > cause interrupts (or whatever you call them in vms land)? Thanks. > On the side, I've always wondered why help couldn't read what was on > the input line before the ? instead of throwing it away... Or why couldn't > DCL do a similar thing ala TOPS-20... Just a thought. > George Boyce, Academic Computing, Cornell Computer Services > george@vax1.ccs.cornell.edu (128.84.252.10) > george@crnlcs.bitnet Here is a Fortran subroutine (READ) using a QIO system service ala VMS-HELP The second subroutine (ANALYZ) treats ascii character 63 (?); this shows how HELP can ignore the string preceding "?". Olivier Marchand - Etudes et Productions Schlumberger (France) "OMARCHAND%EPSVXE@SLB-DOLL.CSNET" SUBROUTINE READ(LU,RDLTH,IOSB) IMPLICIT INTEGER (A-Z) INTEGER*2 CANAL INTEGER*2 FINI1(2) INTEGER FINI(2) INTEGER IOSB(2) BYTE MASK(8) INTEGER*2 RDLTH INTEGER*2 PRLTH /7/ CHARACTER*512 LU CHARACTER*7 PROMPT /'Topic? '/ CHARACTER*11 TERMINAL /'SYS$COMMAND'/ EQUIVALENCE (FINI,FINI1) INCLUDE '($IODEF)' c ------------------------------------- STATUS = SYS$ASSIGN(TERMINAL,CANAL,,) c ------------------------------------- IF (.NOT. STATUS) STOP 'Error assigning a channel to SYS$COMMAND' c we need 64 bits (=8 bytes) to be able to set bit number 63. FINI1(1) = 8 FINI (2) = %LOC(MASK) c Zero mask DO I = 1, 8 MASK(I) = 0 ENDDO c set bit 13 (ascii character 13 "" is a terminator) MASK(2) = 2**5 c set bit 63 (ascii character 63 "?" is a terminator) MASK(8) = 2**7 c ------------------------------------- STATUS = SYS$QIOW(%VAL(5), & %VAL(CANAL), & %VAL(IO$_READPROMPT), & IOSB,,, & %REF(LU), & %VAL(RDLTH),, & %REF(FINI), & %REF(PROMPT), & %VAL(PRLTH)) c ------------------------------------- IF (.NOT. STATUS) STOP 'Error during read' RETURN END SUBROUTINE ANALYZ(STRING,LULTH,IOSB) CHARACTER*512 STRING INTEGER*2 IOSB(4) INTEGER*2 LULTH INTEGER*2 STATUS INTEGER*2 LENGTH INTEGER*2 TERMIN INTEGER*2 TRSIZE STATUS = IOSB(1) LENGTH = IOSB(2) TERMIN = IOSB(3) TRSIZE = IOSB(4) IF ((LENGTH.EQ.LULTH).AND.(TERMIN.EQ.0)) STOP 'String too long' IF (TERMIN.EQ.63) CALL DO RETURN END