home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!troi!steve
- From: steve@dbaccess.com (Steve Suttles)
- Newsgroups: comp.os.vms
- Subject: Re: DCL quirk (fwd)
- Message-ID: <162@mccoy.dbaccess.com>
- Date: 28 Jan 93 01:16:43 GMT
- References: <1k6h39INNq3f@lynx.unm.edu>
- Organization: Cross Access Corp., Santa Clara, CA
- Lines: 101
- X-Newsreader: Tin 1.1 PL4
-
- dgalb@carina.unm.edu (David Galbraith CIRT) writes:
- :
- : I got this from a friend... Can somebody give a good explanation as to
- : why it doesn't give an error?
- :
- : Thanks,
- : David Galbraith
- : dgalb@unm.edu
- :
- : -------------------------------------------------------------------------------
- : From: JCSTASKO@bootes.unm.edu "JOHN STASKO"
- : To: dgalb@uranus.unm.edu
- : Subj: DCL quirk
- :
- :
- : Dear Dave:
- :
- : Why does the following command not give an error?
- :
- : $ '''''''''''''''
- :
- : (any number of apostrophes will work.)
- :
- : =John
- : -------------------------------------------------------------------------------
-
- Because an apostrophe says "Any name that follows me should be looked
- up as a DCL symbol; if one is found, that value goes in that place.
- Otherwise, a null value goes there". An apostrophe can be used to
- terminate the name and get tossed (so 'foo'bar might look like FOObar)
- or any non-naming character terminates the name (like a space). For
- that reason, there is no requirement for a terminating apostrophe, and
- therefore an even or odd number of apostrophes will have the same
- effect.
-
- That effect is to look up the null name (which cannot have a value) and
- discover that it has no value, and throw away matching apostrophes as
- having been satisfied until there are no more pairs. If there is an
- odd number, the last one will be thrown away singly. Eventually, DCL
- will glue all those nothings together, only to discover that your
- freind typed...nothing. And to DCL, a blank line is not an error.
-
- If you treat DCL like a black box, there are all KINDS of wierd things
- you can get it to do. It's kinda fun to figure out what they do
- beforehand; it's rewarding to try it and be right. It's surprising
- when it's figured wrong. IF YOU CHOOSE TO PLAY THIS GAME, BE CERTAIN
- YOU CAN'T HARM ANYTHING (i.e., log in as a peon and assume you'll lose
- files).
-
- Neat things off the top of my head:
-
- HELP ME
-
- MAKE LOVE (results depend on whether TECO is installed)
-
- LOGORYTHM
-
- DEFINE MAIL UPS
-
- HELP YOU
-
- DIR :== DELETE
-
- EDIT == "WRITE SYS$OUTPUT ""neener neener neener""!"
-
- SET MESSAGE /NOF/NOI/NOS/NOT
-
- ASSIGN _NL: SYS$SYSTEM
-
- SET TERMINAL/SPEED=0
-
- ASSIGN SYS$PRINT SYS$BATCH
-
- ASSIGN :== DEFINE
-
- DEFINE := ASSIGN
-
- DEFINE :== DEFINE
-
- SET NOCONTROL=(Y,T)
- WAIT 1:0:0
-
- FORMAT SYS$SYSDEVICE * I WARNED YOU!! *
-
- UNFORMAT SYS$SYSDEVICE
-
- RENAME SYS$SYSDEVICE:[000000]000000.dir; 111111
-
- RENAME SYS$SYSTEM:*.exe *.com
-
- PRINT NASTY.TXT /NONO
-
- SUB MERGE /NONO
-
- ... and others...
-
- --
- Steve Suttles Internet: steve@dbaccess.com Dr. DCL is IN!
- CROSS ACCESS Corporation UUCP: {uunet,sgiblab}!troi!steve Yo speako TECO!
- 2900 Gordon Ave, Suite 100 fax: (408) 735-0328 Talk data to me!
- Santa Clara, CA 95051-0718 vox: (408) 735-7545 HA! It's under 4 lines NOW!
-