Post Reply 
From 6 single program blocks make one Program!?
03-27-2017, 12:22 PM
Post: #3
RE: From 6 single program blocks make one Program!?
Since you have 6 single program blocks, would configuring them as subroutines work for you? You can then "goto" them by using their program name.

Here's a little example:

Code:

// Declare Subroutines Here

clrscrn();   // Clears screen and redraws softmenu

// prog1();  // Your subroutines here ...
// prog2();
// prog3();
// prog4();
// prog5();
// prog6();

EXPORT concept()
BEGIN

  clrscrn;
  RECT_P(G0,0,0,320,220,rgb(0,255,0));
  WAIT(2);

//  Do some things.
//  .
//  prog3; // subroutine might be used here
//  .
//  --------------

  clrscrn;
  RECT_P(G0,0,0,320,220,rgb(255,0,0));
  WAIT(2);

//  Do some more things.
//  .
//  prog5; // subroutine might be used here, etc.
//  .
//  --------------

END;
// ==== End of Main Program ====

// ---- Subroutine Programs ----

clrscrn()
BEGIN
  RECT();           // Clear Screen
  DRAWMENU("Prog1","Prog2","Prog3","Prog4","Prog5","Prog6");     // Menu labels
  RETURN;
END;
// ==== End of clrscrn() Subroutine ====
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: From 6 single program blocks make one Program!? - DrD - 03-27-2017 12:22 PM



User(s) browsing this thread: 2 Guest(s)