vs-demo.red 750 B

123456789101112131415161718192021222324252627
  1. % Create a small virtual screen, 10 by 10 characters, starting at
  2. % row 8 column 10. (Remember the upper left hand corner is Row 0, Column 0.)
  3. s1 := CreateVirtualScreen(10, 10, 8, 10);
  4. % Fill the small screen with the letter A.
  5. for i := 0:9 do for j := 0:9 do WriteToScreen(s1, char A, i, j);
  6. % In normal "two window mode" there are 4 active screens, so the length of
  7. % the list will be 4.
  8. length activescreenlist;
  9. % Selecting s1 gives us 5 active screens, and displays s1.
  10. % However, the "main" screen will partly cover s1.
  11. SelectScreen(s1);
  12. % Deselecting s1 gives us 4 active screens.
  13. DeSelectScreen(s1);
  14. % Execute this FOR loop to see how stuff on the bottom window scrolls
  15. % beneath s1.
  16. for i := 1:30 do write i, " ",i^2, " ", i^3;