Re: [julia-users] Assigning variables

2015-11-23 Thread Sisyphuss
Maybe metaprogramming? On Sunday, November 22, 2015 at 8:52:24 PM UTC+1, Stefan Karpinski wrote: > > Not really. An array is much better for this. > > On Sun, Nov 22, 2015 at 2:28 PM, digxx > wrote: > >> Manually I can do: >> arr1=... >> arr2=... >> arr3=... >> and so on

Re: [julia-users] Assigning variables

2015-11-23 Thread Stefan Karpinski
You have a bunch of values indexed by an integer. That's what arrays are for. On Mon, Nov 23, 2015 at 10:11 AM, Sisyphuss wrote: > Maybe metaprogramming? > > > On Sunday, November 22, 2015 at 8:52:24 PM UTC+1, Stefan Karpinski wrote: >> >> Not really. An array is much

Re: [julia-users] Assigning variables

2015-11-23 Thread Sisyphuss
I knew it. On Monday, November 23, 2015 at 4:25:37 PM UTC+1, Stefan Karpinski wrote: > > You have a bunch of values indexed by an integer. That's what arrays are > for. > > On Mon, Nov 23, 2015 at 10:11 AM, Sisyphuss > wrote: > >> Maybe metaprogramming? >> >> >> On

[julia-users] Assigning variables

2015-11-22 Thread digxx
Manually I can do: arr1=... arr2=... arr3=... and so on If I have a loop over i can i construct in each loop a new variable symbolically like this: arr*string(i)=... ?

Re: [julia-users] Assigning variables

2015-11-22 Thread Stefan Karpinski
Not really. An array is much better for this. On Sun, Nov 22, 2015 at 2:28 PM, digxx wrote: > Manually I can do: > arr1=... > arr2=... > arr3=... > and so on > If I have a loop over i can i construct in each loop a new variable > symbolically like this: >

Re: [julia-users] Assigning variables in other modules vs. assigning to fields of types from other modules

2014-06-10 Thread Leah Hanson
I would guess that the difference is that `MyMod.b = 7.6` changes the value that the variable is bound to, where `MyMod.a.val = 4.5` modifies the value of the variable. This subtle difference is similar to a function that takes and Int and an Array being able to make externally visible