[julia-users] Re: Value assignment of compound expression

2016-11-10 Thread David P. Sanders
El jueves, 10 de noviembre de 2016, 0:43:19 (UTC-5), wan...@terpmail.umd.edu escribió: > > > > Hi guys, > > I am new to Julia and learning from scratch. I ran into the compound > expression like this: > > > tri=base=5;height=10;1/2*base*height > > > This is to calculate the triangle area. The

[julia-users] Re: Value assignment of compound expression

2016-11-09 Thread Valentin Churavy
Welcome to Julia. Similar to other programming language you can (but you do not need to) use a semicolon as a separator between statements. So your code example is equivalent to: tri=base=5 height=10 1/2*base*height so there is no assignment to tri after the first line, and thus the value is