Got it. Thanks for the fast, clear reply.

On Thursday, March 6, 2014 11:12:39 PM UTC-5, Jameson wrote:
>
> `r.step` is not defined to be anything meaningful to the user. It is a 
> data field and all data fields are considered to be private details in 
> Julia. You can access them if you want, but they typically aren't part of 
> the API and may change at the whim of the implementer. You are probably 
> looking for `step(r)` which does return 0.3 in both cases.
>
> The range from 0.6 to 1.4 in steps of 0.3 ends at 1.2, so that's what you 
> get when you query for the last value `last(r)`
>
>
>
>
> On Thu, Mar 6, 2014 at 10:56 PM, Stephen Voinea 
> <scvo...@gmail.com<javascript:>
> > wrote:
>
>> I noticed the following strangeness:
>>
>> julia> r = 0.6:0.3:1.2
>> 0.6:0.3:1.2
>>
>> julia> r.step
>> 3.0
>>
>> julia> r.start
>> 6.0
>>
>> julia> r = 0.6:0.3:1.4
>> 0.6:0.3:1.2
>>
>> julia> r.start
>> 0.6
>>
>> julia> r.step
>> 0.3
>>
>>  Am I missing something?
>>
>> julia> versioninfo()
>> Julia Version 0.3.0-prerelease+1829
>> Commit 037a469* (2014-03-04 12:46 UTC)
>> Platform Info:
>>   System: Darwin (x86_64-apple-darwin13.1.0)
>>   CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
>>   WORD_SIZE: 64
>>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
>>   LAPACK: libopenblas
>>   LIBM: libopenlibm
>>
>> Thanks.
>>
>
>

Reply via email to