home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / VOGLE.ZIP / EXAMPLES / FGETSTR.FOR < prev    next >
Text File  |  2000-02-11  |  1KB  |  53 lines

  1.     program fgetstr
  2. c
  3. c                                   Don't forget to declare getstring
  4. c                                        |||||||||
  5.     integer BLACK, GREEN, YELLOW, i, getstring
  6.     parameter (BLACK = 0, GREEN = 2, YELLOW = 3)
  7.     character *128 buf(10), dev*20
  8.  
  9.     print*, 'Enter device:'
  10.     read (*, '(a)') dev
  11.  
  12.     print*, 'Enter a font name:'
  13.     read (*, '(a)') buf(1)
  14.  
  15.     call vinit(dev)
  16.  
  17.     call font(buf(1))
  18.  
  19.     call clipping(.false.)
  20.  
  21.     call window(-1.0, 1.0, -1.0, 1.0, 1.0, -1.0)
  22.     call lookat(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0)
  23.  
  24.     call textsize(0.1, 0.25)
  25.  
  26.  
  27.     call rotate(30.0, 'x')
  28.     call rotate(30.0, 'z')
  29.     call rotate(60.0, 'y')
  30.  
  31.     call color(BLACK)
  32.     call clear()
  33.     call color(YELLOW)
  34.  
  35.     call rect(-0.5, -0.5, 0.5, 0.5)
  36.     call move2(-0.5, 0.0)
  37.  
  38.     call color(GREEN)
  39.  
  40.     n = 0
  41. 1    continue
  42.     n = n + 1
  43.     i = getstring(BLACK, buf(n))
  44.     if (i .gt. 0 .and. n .le. 10) goto 1
  45.  
  46.     call vexit
  47.     
  48.     do 2 i = 1, n - 1
  49.         write(*, '(1x, ''Line'',i3,'' was: '', a)') i, buf(i)
  50. 2       continue
  51.  
  52.     end
  53.