home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / rexx / 999 < prev    next >
Encoding:
Internet Message Format  |  1992-09-12  |  1.4 KB

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!yuma!csn!stortek!LSTC2VM.stortek.com!GILMART
  2. From: GILMART@LSTC2VM.stortek.com (Paul Gilmartin)
  3. Newsgroups: comp.lang.rexx
  4. Subject: Re: NOVALUE (was: Blanks, REXX, and portability...)
  5. Message-ID: <1686052F.GILMART@LSTC2VM.stortek.com>
  6. Date: 12 Sep 92 06:22:02 GMT
  7. References: <19920910194427SEB1525@MVS.draper.com> <5456@unixhub.SLAC.Stanford.EDU>
  8. Sender: usenet@stortek.com
  9. Organization: StorageTek SW Engineering
  10. Lines: 25
  11.  
  12. In article <5456@unixhub.SLAC.Stanford.EDU>
  13. bobcook@unixhub.SLAC.Stanford.EDU (Bob Cook) writes:
  14.  
  15. >(Somewhat) unfortunately, SIGNAL ON NOVALUE doesn't catch all of the uses of an
  16.   ^^^^^^^^ (I'd say "very" -- gil)
  17. >undefined variable.  At least, it doesn't on VM/CMS.  In the following piece of
  18. >code, the "say" statement produces "Hi" on the console, even though it uses the
  19. >variable named X, which has never been initialized.
  20. >
  21. >  signal on novalue
  22. >  dummy = 'X'
  23. >  a.dummy = 'Hi'
  24. >  say a.x
  25.  
  26. But it would be a real pain if this were reported as an error unless there
  27. were some way to use explicit constants -- better by far, general expressions
  28. -- as compound variable indices.  Namely:
  29.  
  30.    say a.'X'   /* so I don't have to assign 'X' to dummy */
  31.                /* and even:  */
  32.    say a.(substr('UVWXYZ',4,1))   /* Why not, haven't you wanted it? */
  33.  
  34. Is anyone proposing this extremely desirable extension?
  35.  
  36. gil
  37.