VarArgBlock.st
author Claus Gittinger <cg@exept.de>
Thu, 29 Sep 2011 13:19:59 +0200
changeset 13752 e3a3e70985c1
parent 8890 9e9df761477e
child 15093 e79aeb6f6766
child 18011 deb0c3355881
permissions -rw-r--r--
version_CVS
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
     1
"
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
     3
	      All Rights Reserved
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
     4
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
     5
 This software is furnished under a license and may be used
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
     6
 only in accordance with the terms of that license and with the
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
     8
 be provided or otherwise made available to, or used by, any
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
     9
 other person.  No title to or ownership of the software is
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    10
 hereby transferred.
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    11
"
5351
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    12
"{ Package: 'stx:libbasic' }"
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    13
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    14
Block variableSubclass:#VarArgBlock
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:''
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'Kernel-Methods'
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!VarArgBlock class methodsFor:'documentation'!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
copyright
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
	      All Rights Reserved
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
 This software is furnished under a license and may be used
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 only in accordance with the terms of that license and with the
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 be provided or otherwise made available to, or used by, any
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 other person.  No title to or ownership of the software is
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 hereby transferred.
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
documentation
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    VarArgBlocks are much like blocks, but can accept a variable
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    number of arguments. They must be defined as a regular block,
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    with 1 argument. When executed, the actual argument list is
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    passed in that single argument (as a collection).
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
8890
9e9df761477e Fix documentation
Stefan Vogel <sv@exept.de>
parents: 7589
diff changeset
    46
    Create a variableArgument block by sending #asVarArgBlock to a regular
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    block.
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    49
    This is a goody add-on, which may not be available/possible in other 
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    50
    smalltalk implementations. Do not use it if cross-platform
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    51
    portability is required.
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    52
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    53
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    [author:]
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    55
        Claus Gittinger
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    [see also:]
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    58
        Block
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
examples
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
   the same block, evaluated with 2 or 5 arguments:
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    65
                                                                [exBegin]
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
     |b|
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
8890
9e9df761477e Fix documentation
Stefan Vogel <sv@exept.de>
parents: 7589
diff changeset
    68
     b := [:args | Transcript show:'wow: '; showCR:args] asVarArgBlock.
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
     b value:'hi' value:'there'. 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
     b value:'hello' value:'there' value:'how' value:'about' value:'this'.
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    72
                                                                [exEnd]
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
   does it accept a variable number of arguments ?:
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    76
                                                                [exBegin]
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
     |b|
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
     b := [:args | Transcript showCR:args].
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
     Transcript showCR:(b isVarArgBlock).
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
8890
9e9df761477e Fix documentation
Stefan Vogel <sv@exept.de>
parents: 7589
diff changeset
    82
     b := [:args | Transcript showCR:args] asVarArgBlock.
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
     Transcript showCR:(b isVarArgBlock)
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    84
                                                                [exEnd]
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
    "Created: 23.1.1997 / 04:57:26 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
! !
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
5351
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    90
!VarArgBlock class methodsFor:'initialization'!
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    91
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    92
initialize
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    93
    "must clear the is-block flag bit in the class
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    94
     (otherwise, the VM might try to inline value-messages)"
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    95
5353
286dbcd4c605 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5351
diff changeset
    96
    |flags|
286dbcd4c605 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5351
diff changeset
    97
    flags := self flags.
5351
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    98
    flags := flags bitClear:(Behavior flagBlock).
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    99
    flags := flags bitOr:(Behavior flagBlockLike).
5353
286dbcd4c605 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5351
diff changeset
   100
    self flags:flags.
5351
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   101
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   102
    "
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   103
     self flags.       
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   104
     self initialize.
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   105
     self flags.      
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   106
    "
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   107
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   108
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   109
! !
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   110
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
!VarArgBlock methodsFor:'evaluation'!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
value
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
    "evaluate the receiver with no block args."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
    ^ super value:#()
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    "Created: 23.1.1997 / 04:57:49 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
value:arg
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
    "evaluate the receiver with a single argument."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
    ^ super value:(Array with:arg)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
    "Created: 23.1.1997 / 04:57:57 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
value:arg1 value:arg2
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
    "evaluate the receiver with two arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
    ^ super value:(Array with:arg1 with:arg2)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
    "Created: 23.1.1997 / 04:58:03 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
value:arg1 value:arg2 value:arg3
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
    "evaluate the receiver with three arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
    ^ super value:(Array with:arg1 with:arg2 with:arg3)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
    "Created: 23.1.1997 / 04:58:09 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
value:arg1 value:arg2 value:arg3 value:arg4
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    "evaluate the receiver with four arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
    ^ super value:(Array 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
		    with:arg1 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
		    with:arg2 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
		    with:arg3 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
		    with:arg4)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
    "Modified: 22.1.1997 / 19:41:22 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
    "Created: 23.1.1997 / 04:58:14 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
    "evaluate the receiver with five arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    ^ super value:(Array 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
		    with:arg1 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
		    with:arg2 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
		    with:arg3 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
		    with:arg4
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
		    with:arg5)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
    "Modified: 22.1.1997 / 19:41:26 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
    "Created: 23.1.1997 / 04:58:18 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5 value:arg6
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
    "evaluate the receiver with six arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
    ^ super value:(Array 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
		    with:arg1 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
		    with:arg2 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
		    with:arg3 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
		    with:arg4
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
		    with:arg5
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
		    with:arg6)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
    "Modified: 22.1.1997 / 19:41:29 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
    "Created: 23.1.1997 / 04:58:22 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5 value:arg6 value:arg7
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
    "evaluate the receiver with seven arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
    ^ super value:(Array 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
		    with:arg1 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
		    with:arg2 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
		    with:arg3 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
		    with:arg4
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
		    with:arg5
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
		    with:arg6
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
		    with:arg7)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
    "Modified: 22.1.1997 / 19:41:33 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
    "Created: 23.1.1997 / 04:58:26 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5 value:arg6 value:arg7 value:arg8
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
    "evaluate the receiver with eight arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
    ^ super value:(Array 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
		    with:arg1 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
		    with:arg2 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
		    with:arg3 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
		    with:arg4
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
		    with:arg5
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
		    with:arg6
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
		    with:arg7
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
		    with:arg8)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
    "Created: 23.1.1997 / 04:58:30 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
valueWithArguments:argArray
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
    "evaluate the receiver with all arguments in argArray."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
    ^ super value:argArray
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
    "Created: 23.1.1997 / 04:59:16 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
! !
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
!VarArgBlock methodsFor:'testing'!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
isVarArgBlock
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
    "return true, if this block accepts a variable number of arguments"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
    ^ true
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
    "Created: 23.1.1997 / 05:00:18 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
! !
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   237
!VarArgBlock class methodsFor:'documentation'!
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   239
version
13752
e3a3e70985c1 version_CVS
Claus Gittinger <cg@exept.de>
parents: 8890
diff changeset
   240
    ^ '$Header: /cvs/stx/stx/libbasic/VarArgBlock.st,v 1.7 2011-09-29 11:19:59 cg Exp $'
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   241
! !
7589
2ac0ac814fc8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5353
diff changeset
   242
5351
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   243
VarArgBlock initialize!