🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #398

Question on tutorial book

#398
From: XiaoFei Wang
Date: Mon, 06 Apr 1992 14:54
43 lines
1510 bytes
On the blue book, page 141: 

/arrowdict 14 dict def 
arrowdict begin 
 /mtrx matrix def
          end

/arrow 
{ arrowdict begin 
  ......
  /savematrix mtrx currentmatrix def 
  ......
            end
} def 

mtrx is defined in arrowdict and when it ends, mtrx is no longer
defined. How come mtrx is used in the next arrowdict ? 
I have run the following program to verify the scope of a variable. 

/thestring (global) def 
 thestring =
             % answer : global

/exampledict 1 dict def 
 exampledict begin 
 thestring = 
             % answer : global
/thestring (local) def
 thestring = 
             % answer : local 
             end

 thestring = 
             % answer : global

 exampledict begin 
 thestring = 
             % answer : global
             end
-- 
xiaofei@acsu.buffalo.edu | Subscribe Chinese Poem Exchange and Discussion List 
mail LISTSERV@UBVM.BITNET with "SUB CHPOEM-L 1st LastName" in the MESSAGE BODY
InterNet Address: UBVM.CC.BUFFALO.EDU | Posting in UUENCODED GB and BIG5
Technical Details
Message-ID: <1992Apr6.145428.22693@acsu.buffalo.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!swrinde!gatech!rutgers!ub!acsu.buffalo.edu!xiaofei

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!swrinde!gatech!rutgers!ub!acsu.buffalo.edu!xiaofei
From: xiaofei@acsu.buffalo.edu (XiaoFei Wang)
Newsgroups: comp.lang.postscript
Subject: Question on tutorial book
Message-ID: <1992Apr6.145428.22693@acsu.buffalo.edu>
Date: 6 Apr 92 14:54:28 GMT
Sender: usenet@acsu.buffalo.edu
Organization: Physics Dept, State U of New York at Buffalo, Buffalo, NY 14260
Lines: 43
Nntp-Posting-Host: lictor.acsu.buffalo.edu