How do I write multiple statements on a single line?

Post

Posted
Rating:
#1 (In Topic #1237)
Trainee
In BASH, I can chain multiple commands using

Code

;
Is this possible?

I was trying to do something similar to:

Code (gambas)

  1.       startX = 127; lastX = 0; stepX = -1
  2.       startY = 1; lastY = 127; stepY = 1
  3.  

But I've been forced to do:

Code (gambas)

  1.   startX = 127
  2.   lastX = 0
  3.   stepX = -1
  4.   startY = 1
  5.   lastY = 127
  6.   stepY = 1
  7.  

Since I have to do this 9 times to handle horizontal/vertical/diagonals/center.  They both look messy but I was hoping to constrain the ugliness to a few lines -  ;) .
Online now: No Back to the top

Post

Posted
Rating:
#2
Guru
BruceSteers is in the usergroup ‘Guru’
 It's not possible I'm afraid.

But doing something like that nine times can often be turned into a function or done in a loop.
Online now: No Back to the top
1 guest and 0 members have just viewed this.