home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / infosyst / gis / 4937 < prev    next >
Encoding:
Text File  |  1993-01-21  |  3.0 KB  |  95 lines

  1. Newsgroups: comp.infosystems.gis
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!hobbes.physics.uiowa.edu!news.iastate.edu!pv141b.vincent.iastate.edu!sheldon
  3. From: sheldon@iastate.edu (Steve Sheldon)
  4. Subject: Re: Referencing Blanks in ARC/INFO AML's
  5. Message-ID: <sheldon.727637943@pv141b.vincent.iastate.edu>
  6. Sender: news@news.iastate.edu (USENET News System)
  7. Organization: Iowa State University, Ames IA
  8. References: <1993Jan21.120634.811@netnews.whoi.edu>
  9. Date: Thu, 21 Jan 1993 17:39:03 GMT
  10. Lines: 83
  11.  
  12. In <1993Jan21.120634.811@netnews.whoi.edu> dsheehan@whsun1.wh.whoi.edu (John F. Kocik) writes:
  13.  
  14. >A couple of months ago, there was a thread on referencing blanks in text in
  15. >ARC/INFO amls.  I am making a generic mapping package which will run
  16. >smoother if I create my own keyarea command (so that I may place by map
  17. >coordinates rather than page units).  To do this easily, I need to use
  18. >blanks in legend entries so that my text is justified.
  19. >I missed this post.  If someone saved this please email or repost.
  20.  
  21. I saved part of it...
  22.  
  23.  Basically it uses the aml [format <args>] command to pad with spaces.
  24.  
  25. This was from melton@zen.wes.army.mil
  26. -------------------------------------------------------
  27.  
  28. Try this:
  29. ----- cut here -----
  30. &args .tmp$var tmp$cnt
  31.  
  32. /*  PAD.AML
  33. /*
  34. /*  Description: This AML will accept a string, .tmp$var, and
  35. /*               pad it with blanks until it is of length
  36. /*               tmp$cnt.
  37. /*
  38. /*  Author:      R. Eddie Melton, Jr
  39. /*               Atlantic Research Corporation
  40. /*               US Army Corps of Engineers
  41. /*               Waterways Experiment Station
  42. /*               Vicksburg, MS
  43.  
  44. &if [null %.tmp$var%] &then &goto usage
  45. &if [null %tmp$cnt%] &then &goto usage
  46.  
  47. &s .tmp$str := [value %.tmp$var%]
  48.  
  49. &s tmp$reps := %tmp$cnt% - [length %.tmp$str%]
  50.  
  51. &do tmp$I = 1 &to %tmp$reps% &by 1
  52.   &s .tmp$str := [format ' %1%' %.tmp$str%]
  53. &end
  54.  
  55. &s %.tmp$var% := %.tmp$str%
  56.  
  57. &dv tmp$I
  58. &dv tmp$cnt
  59. &dv tmp$reps
  60. &dv .tmp$var
  61. &dv .tmp$str
  62.  
  63. &return
  64. &end
  65.  
  66. /*
  67. /* Display usage
  68. /*
  69. &label usage
  70.   &type Usage: PAD <variable name> <desired length>
  71.   &return
  72. ----- cut here -----
  73.  
  74. Call this from the command line or an aml with:
  75.  
  76.   &run pad <variable name> <desired length>
  77.  
  78. do not use the %s with the variable name.
  79.  
  80. Eddie Melton
  81.  
  82. _______________________________________________________________________________
  83. --------------------------------------+----------------------------------------
  84.      R. Eddie Melton, Jr., (EN-C)     |     E-mail: melton@zen.wes.army.mil
  85.      Atlantic Research Corporation    |             melton@mc1.wes.army.mil
  86.      Waterways Experiment Station     |
  87.      3909 Halls Ferry Road            |     Voice:  (601) 634-2373
  88.      Vicksburg, MS  39180             |     Fax:    (601) 634-3726
  89. --------------------------------------+----------------------------------------
  90. -- 
  91. sheldon@iastate.edu                Steve Sheldon
  92. Project Vincent                    ICSS Resource Unit
  93. SCO ODT, Arc/Info, Atlas GIS       2142 Agronomy Hall
  94.                                    Iowa State University
  95.