Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
10
Task/Accumulator-factory/VBScript/accumulator-factory-1.vb
Normal file
10
Task/Accumulator-factory/VBScript/accumulator-factory-1.vb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
class accumulator
|
||||
dim A
|
||||
public default function acc(x)
|
||||
A = A + x
|
||||
acc = A
|
||||
end function
|
||||
public property get accum
|
||||
accum = A
|
||||
end property
|
||||
end class
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
dim a
|
||||
set a = new accumulator
|
||||
x = a( 1 )
|
||||
a 5
|
||||
dim b
|
||||
set b = new accumulator
|
||||
b 3
|
||||
wscript.echo a(2.3)
|
||||
Loading…
Add table
Add a link
Reference in a new issue