There is no difference, as far as I know.

'=' seems to be used more for explicit ranges (i = 1:5) and 'in' seems to 
be used more for variables (i in mylist). But using 'in' for everything is 
ok too.

The '=' is there for familiarity with matlab. Remember that julia's syntax 
was in part designed to be familiar to matlab users.

On Tuesday, October 27, 2015 at 8:26:07 AM UTC+13, FANG Colin wrote:
>
> Hi All
>
> I have got a stupid question:
>
> Are there any difference in "for i in 1:5" and "for i = 1:5"?
>
> Does the julia community prefer one to the other? I see use of both in the 
> documentations and source code.
>
> Personally I haven't seen much use of "for i = 1:5" in other languages.
>
> Thanks.
>

Reply via email to