Block.st
changeset 21123 431c0e8f2dd8
parent 20870 fae257fc5172
child 21242 19fabe339f8b
child 21314 e4b70f6ab264
equal deleted inserted replaced
21122:a75ae33b406f 21123:431c0e8f2dd8
     1 "{ Encoding: utf8 }"
       
     2 
       
     3 "
     1 "
     4  COPYRIGHT (c) 1989 by Claus Gittinger
     2  COPYRIGHT (c) 1989 by Claus Gittinger
     5 	      All Rights Reserved
     3 	      All Rights Reserved
     6 
     4 
     7  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
   709 
   707 
   710     "Created: / 28-08-2010 / 14:41:15 / cg"
   708     "Created: / 28-08-2010 / 14:41:15 / cg"
   711 ! !
   709 ! !
   712 
   710 
   713 
   711 
   714 
       
   715 !Block methodsFor:'accessing'!
   712 !Block methodsFor:'accessing'!
   716 
   713 
   717 home
   714 home
   718     "return the receiver's home context (the context where it was
   715     "return the receiver's home context (the context where it was
   719      created). For cheap blocks, nil is returned"
   716      created). For cheap blocks, nil is returned"
   760     ^ nil
   757     ^ nil
   761 !
   758 !
   762 
   759 
   763 numArgs
   760 numArgs
   764     "return the number of arguments I expect for evaluation.
   761     "return the number of arguments I expect for evaluation.
   765      Please use argumentCount, which is ANSI"
   762      Please use argumentCount for ANSI compatibility"
   766 
   763 
   767 "/    <resource: #obsolete>
   764 "/    <resource: #obsolete>
   768 
   765 
   769     ^ nargs
   766     ^ nargs
   770 ! !
   767 ! !
   904     
   901     
   905     Transcript show:anInfoString.
   902     Transcript show:anInfoString.
   906     micros < 1000 ifTrue:[
   903     micros < 1000 ifTrue:[
   907         "/ too stupid: many fonts do not have a mu,
   904         "/ too stupid: many fonts do not have a mu,
   908         "/ so I output it as us here.
   905         "/ so I output it as us here.
   909         Transcript show:micros; show:' µs'.
   906         Transcript show:micros; show:' µs'.
   910     ] ifFalse:[
   907     ] ifFalse:[
   911         micros < 100000 ifTrue:[
   908         micros < 100000 ifTrue:[
   912             millis := (micros / 1000.0) asFixedPointRoundedToScale:2.
   909             millis := (micros / 1000.0) asFixedPointRoundedToScale:2.
   913             Transcript show:millis; show:' ms'.
   910             Transcript show:millis; show:' ms'.
   914         ] ifFalse:[
   911         ] ifFalse:[