November 2017
Beginner
316 pages
6h 40m
English
So far in this chapter, we have been discussing various data types in Julia, mostly which specific type they are and how we declare them. Now, what if we wanted to have a value of a specific data type converted to another data type?
For instance, we have a function with the name distance_covered (speed::Int64, time_taken::Int64), which returns the distance covered by a moving vehicle's speed and time taken. Now, as we know, distance is calculated as the product of speed with the time taken. Or, in other words, we have the function definition like this:
julia> function distance_covered( speed::Int64, time_taken::Int64) return speed * time_taken enddistance_covered (generic function with 1 method)
Now, whatever the result of ...
Read now
Unlock full access