Thursday 25 February 2016

Julia: Compound expressions

By using compound expression, we can evaluate multiple expressions in one block.

Syntax
begin
   expression1
   expression2
         …..
         …..
   expression

end

julia> result=begin
               a=10
               b=20
               c=30
               a=a+b
               b=a*c
               b
       end
900

julia> result
900



Previous                                                 Next                                                 Home

No comments:

Post a Comment