home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 22047 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  3.1 KB

  1. Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!troi!steve
  2. From: steve@dbaccess.com (Steve Suttles)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: DCL quirk (fwd)
  5. Message-ID: <162@mccoy.dbaccess.com>
  6. Date: 28 Jan 93 01:16:43 GMT
  7. References: <1k6h39INNq3f@lynx.unm.edu>
  8. Organization: Cross Access Corp., Santa Clara, CA
  9. Lines: 101
  10. X-Newsreader: Tin 1.1 PL4
  11.  
  12. dgalb@carina.unm.edu (David Galbraith CIRT) writes:
  13. : I got this from a friend... Can somebody give a good explanation as to
  14. : why it doesn't give an error? 
  15. : Thanks,
  16. : David Galbraith
  17. : dgalb@unm.edu
  18. : -------------------------------------------------------------------------------
  19. : From:   JCSTASKO@bootes.unm.edu "JOHN STASKO"
  20. : To:     dgalb@uranus.unm.edu
  21. : Subj:   DCL quirk
  22. : Dear Dave:
  23. : Why does the following command not give an error?
  24. : $ '''''''''''''''
  25. : (any number of apostrophes will work.)
  26. : =John
  27. : -------------------------------------------------------------------------------
  28.  
  29. Because an apostrophe says "Any name that follows me should be looked
  30. up as a DCL symbol; if one is found, that value goes in that place.
  31. Otherwise, a null value goes there".  An apostrophe can be used to
  32. terminate the name and get tossed (so 'foo'bar might look like FOObar)
  33. or any non-naming character terminates the name (like a space).  For
  34. that reason, there is no requirement for a terminating apostrophe, and
  35. therefore an even or odd number of apostrophes will have the same
  36. effect.
  37.  
  38. That effect is to look up the null name (which cannot have a value) and
  39. discover that it has no value, and throw away matching apostrophes as
  40. having been satisfied until there are no more pairs.  If there is an
  41. odd number, the last one will be thrown away singly.  Eventually, DCL
  42. will glue all those nothings together, only to discover that your
  43. freind typed...nothing.  And to DCL, a blank line is not an error.
  44.  
  45. If you treat DCL like a black box, there are all KINDS of wierd things
  46. you can get it to do.  It's kinda fun to figure out what they do
  47. beforehand; it's rewarding to try it and be right.  It's surprising
  48. when it's figured wrong.  IF YOU CHOOSE TO PLAY THIS GAME, BE CERTAIN
  49. YOU CAN'T HARM ANYTHING (i.e., log in as a peon and assume you'll lose
  50. files).
  51.  
  52. Neat things off the top of my head:
  53.  
  54. HELP ME
  55.  
  56. MAKE LOVE  (results depend on whether TECO is installed)
  57.  
  58. LOGORYTHM
  59.  
  60. DEFINE MAIL UPS
  61.  
  62. HELP YOU
  63.  
  64. DIR :== DELETE
  65.  
  66. EDIT == "WRITE SYS$OUTPUT ""neener neener neener""!"
  67.  
  68. SET MESSAGE /NOF/NOI/NOS/NOT
  69.  
  70. ASSIGN _NL: SYS$SYSTEM
  71.  
  72. SET TERMINAL/SPEED=0
  73.  
  74. ASSIGN SYS$PRINT SYS$BATCH
  75.  
  76. ASSIGN :== DEFINE
  77.  
  78. DEFINE := ASSIGN
  79.  
  80. DEFINE :== DEFINE
  81.  
  82. SET NOCONTROL=(Y,T)
  83. WAIT 1:0:0
  84.  
  85. FORMAT SYS$SYSDEVICE    * I WARNED YOU!! *
  86.  
  87. UNFORMAT SYS$SYSDEVICE
  88.  
  89. RENAME SYS$SYSDEVICE:[000000]000000.dir; 111111
  90.  
  91. RENAME SYS$SYSTEM:*.exe *.com
  92.  
  93. PRINT NASTY.TXT /NONO
  94.  
  95. SUB MERGE /NONO
  96.  
  97. ... and others...
  98.  
  99. -- 
  100. Steve Suttles                Internet:  steve@dbaccess.com      Dr. DCL is IN!
  101. CROSS ACCESS Corporation     UUCP: {uunet,sgiblab}!troi!steve  Yo speako TECO!
  102. 2900 Gordon Ave, Suite 100   fax: (408) 735-0328              Talk data to me!
  103. Santa Clara, CA 95051-0718   vox: (408) 735-7545   HA! It's under 4 lines NOW!
  104.