I know you can force type declarations using '::' so
my_int_var::Int64 my_float_var::Float64 now my_int_var requires an Int64 type, and my_float_var requires a Float64 and both will float an error if you attempt to set them equal to a different type. Although, in all honestly, I'm not sure if Float64 would cast an Int to a float or not. But for user defined types this works as expected. On Friday, February 27, 2015 at 11:35:41 AM UTC-5, Stéphane Goujet wrote: > > Hello, > > is there an option, a pragma (or whatever it can be called), that > enforces variable declaration in a Julia program? I am looking for > something like "use strict;" in Perl. There could be two options, one for > just declaring variable names (more or less as in Perl), one to force type > declarations too. > Thank you for any information on whether it already exists or not, or > whether if might exist one day or not. > > > Goodbye, > Stéphane.
