VarArgBlock.st
author Claus Gittinger <cg@exept.de>
Fri, 29 Aug 2003 21:21:35 +0200
changeset 7589 2ac0ac814fc8
parent 5353 286dbcd4c605
child 8890 9e9df761477e
permissions -rw-r--r--
*** empty log message ***
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
"
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    12
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    13
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    14
5351
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    15
"{ Package: 'stx:libbasic' }"
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    16
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    17
Block variableSubclass:#VarArgBlock
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	instanceVariableNames:''
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	classVariableNames:''
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	poolDictionaries:''
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	category:'Kernel-Methods'
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
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!VarArgBlock class methodsFor:'documentation'!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
copyright
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
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
	      All Rights Reserved
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 This software is furnished under a license and may be used
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 only in accordance with the terms of that license and with the
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 inclusion of the above copyright notice.   This software may not
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 be provided or otherwise made available to, or used by, any
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 other person.  No title to or ownership of the software is
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
 hereby transferred.
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
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
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
documentation
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    VarArgBlocks are much like blocks, but can accept a variable
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    number of arguments. They must be defined as a regular block,
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    with 1 argument. When executed, the actual argument list is
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    passed in that single argument (as a collection).
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    Create a variableArgument block by sending #varArgs to a regular
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    block.
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    52
    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
    53
    smalltalk implementations. Do not use it if cross-platform
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    54
    portability is required.
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    55
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    56
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    [author:]
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    58
        Claus Gittinger
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
    [see also:]
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    61
        Block
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
"
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
!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
examples
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
   the same block, evaluated with 2 or 5 arguments:
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    69
                                                                [exBegin]
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
     |b|
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    72
     b := [:args | Transcript show:'wow: '; showCR:args] beVarArg.
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
     b value:'hi' value:'there'. 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
     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
    76
                                                                [exEnd]
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
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
   does it accept a variable number of arguments ?:
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    80
                                                                [exBegin]
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
     |b|
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
     b := [:args | Transcript showCR:args].
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
     Transcript showCR:(b isVarArgBlock).
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    86
     b := [:args | Transcript showCR:args] beVarArg.
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
     Transcript showCR:(b isVarArgBlock)
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
    88
                                                                [exEnd]
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
    "Created: 23.1.1997 / 04:57:26 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
! !
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
5351
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    94
!VarArgBlock class methodsFor:'initialization'!
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    95
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    96
initialize
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
    97
    "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
    98
     (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
    99
5353
286dbcd4c605 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5351
diff changeset
   100
    |flags|
286dbcd4c605 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5351
diff changeset
   101
    flags := self flags.
5351
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   102
    flags := flags bitClear:(Behavior flagBlock).
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   103
    flags := flags bitOr:(Behavior flagBlockLike).
5353
286dbcd4c605 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5351
diff changeset
   104
    self flags:flags.
5351
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   105
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
     self flags.       
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   108
     self initialize.
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   109
     self flags.      
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   110
    "
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   111
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   112
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   113
! !
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   114
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
!VarArgBlock methodsFor:'evaluation'!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
value
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    "evaluate the receiver with no block args."
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
    ^ super value:#()
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
    "Created: 23.1.1997 / 04:57:49 / cg"
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
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
value:arg
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
    "evaluate the receiver with a single argument."
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
    ^ super value:(Array with:arg)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
    "Created: 23.1.1997 / 04:57:57 / cg"
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
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
value:arg1 value:arg2
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
    "evaluate the receiver with two arguments."
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
    ^ super value:(Array with:arg1 with:arg2)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
    "Created: 23.1.1997 / 04:58:03 / cg"
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
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
value:arg1 value:arg2 value:arg3
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
    "evaluate the receiver with three arguments."
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
    ^ super value:(Array with:arg1 with:arg2 with:arg3)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    "Created: 23.1.1997 / 04:58:09 / cg"
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
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
value:arg1 value:arg2 value:arg3 value:arg4
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
    "evaluate the receiver with four arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
    ^ super value:(Array 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
		    with:arg1 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
		    with:arg2 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
		    with:arg3 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
		    with:arg4)
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
    "Modified: 22.1.1997 / 19:41:22 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
    "Created: 23.1.1997 / 04:58:14 / cg"
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
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
    "evaluate the receiver with five arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
    ^ super value:(Array 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
		    with:arg1 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
		    with:arg2 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
		    with:arg3 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
		    with:arg4
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
		    with:arg5)
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
    "Modified: 22.1.1997 / 19:41:26 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
    "Created: 23.1.1997 / 04:58:18 / cg"
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
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5 value:arg6
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
    "evaluate the receiver with six arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
    ^ super value:(Array 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
		    with:arg1 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
		    with:arg2 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
		    with:arg3 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
		    with:arg4
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
		    with:arg5
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
		    with:arg6)
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
    "Modified: 22.1.1997 / 19:41:29 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
    "Created: 23.1.1997 / 04:58:22 / cg"
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
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
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
   192
    "evaluate the receiver with seven arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
    ^ super value:(Array 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
		    with:arg1 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
		    with:arg2 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
		    with:arg3 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
		    with:arg4
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
		    with:arg5
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
		    with:arg6
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
		    with:arg7)
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
    "Modified: 22.1.1997 / 19:41:33 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
    "Created: 23.1.1997 / 04:58:26 / cg"
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
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
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
   208
    "evaluate the receiver with eight arguments."
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
    ^ super value:(Array 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
		    with:arg1 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
		    with:arg2 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
		    with:arg3 
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
		    with:arg4
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
		    with:arg5
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
		    with:arg6
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
		    with:arg7
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
		    with:arg8)
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
    "Created: 23.1.1997 / 04:58:30 / cg"
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
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
valueWithArguments:argArray
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
    "evaluate the receiver with all arguments in argArray."
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
    ^ super value:argArray
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
    "Created: 23.1.1997 / 04:59:16 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
! !
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
!VarArgBlock methodsFor:'testing'!
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
isVarArgBlock
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
    "return true, if this block accepts a variable number of arguments"
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
    ^ true
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
    "Created: 23.1.1997 / 05:00:18 / cg"
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
! !
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   241
!VarArgBlock class methodsFor:'documentation'!
2239
3441ce074c04 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   243
version
7589
2ac0ac814fc8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5353
diff changeset
   244
    ^ '$Header: /cvs/stx/stx/libbasic/VarArgBlock.st,v 1.5 2003-08-29 19:21:32 cg Exp $'
2240
96ecba03d362 defined source container
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   245
! !
7589
2ac0ac814fc8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5353
diff changeset
   246
5351
f9529bd6b6e4 oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents: 2240
diff changeset
   247
VarArgBlock initialize!