Code: Select all

```
//Range
MINS = 1.2
INCS = 0.05
MAXS = 5
objref vecs
vecs = new Vector(((MAXS-MINS)/INCS)+1)
print "vector Size: ", vecs.size()
print "vector defined Size: ", (((MAXS-MINS)/INCS)+1)
print "\nRetry - With size variable"
x = (((MAXS-MINS)/INCS)+1)
vecs = new Vector(x)
print "vector Size: ", vecs.size()
print "vector defined Size: ", x
print "\nRetry - Without any variables"
vecs = new Vector(((5-1.2)/0.05)+1)
print "vector Size: ", vecs.size()
print "vector defined Size: ", (((5-1.2)/0.05)+1)
print "\nRetry - With direct size"
vecs = new Vector(77)
print "vector Size: ", vecs.size()
print "vector defined Size: ", 77
```

Why is the size "1 less" when defining through expressions/variables - as compared to direct assignment?NEURON -- Release 7.3 (849:5be3d097b917) 2013-04-11

Duke, Yale, and the BlueBrain Project -- Copyright 1984-2013

See http://www.neuron.yale.edu/neuron/credits

vector size: 76

vector defined size: 77

Retry - With size variable

vector size: 76

vector defined size: 77

Retry - Without any variables

vector size: 76

vector defined size: 77

Retry - With direct size

vector size: 77

vector defined size: 77