Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FloatRange not exported #6606

Closed
freddycct opened this issue Apr 23, 2014 · 3 comments
Closed

FloatRange not exported #6606

freddycct opened this issue Apr 23, 2014 · 3 comments

Comments

@freddycct
Copy link

typeof(1:1.1:5)

Out: FloatRange{Float64} (constructor with 1 method)
But

super(FloatRange{Float64})

Out: FloatRange not defined

function print_range(r::FloatRange{Float})
    for e in r
        println(e)
    end
end

Out: FloatRange not defined

@simonster
Copy link
Member

FloatRange does not appear to be exported from Base, so you need to run using Base.FloatRange before trying to use it or reference it as Base.FloatRange from your code. It is a little strange that we export UnitRange and StepRange but not FloatRange.

(Your code above will also throw because Julia has no Float type; you probably want either Float64 or FloatingPoint.)

@simonster simonster changed the title FloatRange not defined FloatRange not exported Apr 23, 2014
@freddycct
Copy link
Author

Ok, probably a bug, please export FloatRange from Base...

@pao
Copy link
Member

pao commented Apr 23, 2014

cc @StefanKarpinski cf #5636

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants