File: grgcom.f

package info (click to toggle)
pgplot5 5.2.2-19
  • links: PTS
  • area: non-free
  • in suites: jessie-kfreebsd, wheezy
  • size: 7,060 kB
  • sloc: fortran: 39,792; ansic: 22,549; objc: 1,534; sh: 1,305; makefile: 386; perl: 234; pascal: 233; tcl: 190; awk: 51; csh: 25
file content (30 lines) | stat: -rw-r--r-- 986 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

C*GRGCOM -- read with prompt from user's terminal (VMS)
C+
      INTEGER FUNCTION GRGCOM(STRING, PROMPT, L)
      CHARACTER*(*) STRING, PROMPT
      INTEGER L
C
C Issue prompt and read a line from the user's terminal; in VMS,
C this is equivalent to LIB$GET_COMMAND.
C
C Arguments:
C  STRING : (output) receives the string read from the terminal.
C  PROMPT : (input) prompt string.
C  L      : (output) length of STRING.
C
C Returns:
C  GRGCOM : 1 if successful, 0 if an error occurs (e.g., end of file).
C--
C  9-Feb-1988
C 12-May-1998: workaround for VMS bug, provided by Magnus Zolliker; the
C      extra CR//LF is sometimes required if the terminal is used as
C      a graphics device of type /TEK or similar.
C-----------------------------------------------------------------------
      INTEGER CR, LF
      PARAMETER (CR=13, LF=10)
      INTEGER LIB$GET_COMMAND
C
      GRGCOM = LIB$GET_COMMAND(STRING, CHAR(CR)//CHAR(LF)//PROMPT, L)
      IF (GRGCOM.NE.1) GRGCOM = 0
      END