home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / tcl / 2112 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.5 KB  |  38 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!hermes.chpc.utexas.edu!news.utdallas.edu!corpgate!crchh327!tdoan
  3. From: tdoan@bnr.ca (Tuan Doan)
  4. Subject: Help on reading shell variable/environment
  5. Message-ID: <1992Dec15.204940.15394@bnr.ca>
  6. Keywords: TCL/TK,variable,environment,shell
  7. Sender: news@bnr.ca (News on crchh327)
  8. Nntp-Posting-Host: crchh404
  9. Organization: Bell-Northern Research, Richardson, Tx.
  10. Date: Tue, 15 Dec 1992 20:49:40 GMT
  11. Lines: 25
  12.  
  13. Hello,
  14.  
  15.    Does anyone know of a way to read shell variable or environment variable
  16. inside TCL/TK?  I need to access the TERM variable so that to prevent my
  17. TCL/TK program from being run when the user is not in an X window environment.
  18.  
  19. Also, is there an easy way to implement set operations in TCL/TK?  For example,
  20.  
  21.    set lista [list a b c]
  22.    set listb [list b c d]
  23.    set listc [and lista listb]        -> listc={b,c}
  24.    set listd [or lista listb]         -> listd={a,b,c,d}
  25.  
  26. One of the nifty functionality that TCL/TK provides is list.  Unfortunately,
  27. no logic's operators on it.
  28.  
  29. Regards,
  30.  
  31.  __  __/  /   /   __  /    |   /    Tuan T. Doan
  32.     /    /   /   /   /   / |  /     Advance Signalling Design
  33.    /    /   /   __  /   /  | /      2201 Lakeside Blvd.  P.O. Box 833871
  34. __/  ______/ __/ __/ __/  __/       Richardson, TX 75083-3871
  35.                                     Phone: 6-444-4575/214-684-4575
  36. Internet:  tdoan@bnr.ca             Fax:   6-444-3716/214-684-3716
  37.       or   tdoan@x400gate.bnr.ca    
  38.