A
anakintang
All,
How can I write "s = s1 + s2 + s3" in multiple lines like below:
s= s1
+ s2
+ s3
Thanks
How can I write "s = s1 + s2 + s3" in multiple lines like below:
s= s1
+ s2
+ s3
Thanks
You can't.
You can do it differently, though:
s = s1 +
s2 +
s3
If you have an operator at the end of the line, needing operands, Ruby
keeps reading.
-s
All,
How can I write "s = s1 + s2 + s3" in multiple lines like below:
s= s1
+ s2
+ s3
Thanks
anakintang said:How can I write "s = s1 + s2 + s3" in multiple lines like below:
Like that
s = s1 +
s2 +
s3
or
s = s1 \
+ s2 \
+ s3
AFAIK, the first form is more in use than the second.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.