Author Topic: graphs with QB64 and how to scroll the screen.  (Read 7672 times)

0 Members and 1 Guest are viewing this topic.

Offline bartok

  • Newbie
  • Posts: 80
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #15 on: January 22, 2021, 07:07:17 am »
Hi,
Analyzing the Pete's code for scrolling the screen, I came across PCOPY statement. I have already meet it in BitMaze example of the tutorial by Terry and in the QB64 help, and I thought to have understood it:

BITMAZE:

Code: QB64: [Select]
  1. '*
  2. '* Bitwise math demonstration
  3. '*
  4. '* Draws a simple map and allows player to move circle within map
  5. '*
  6.  
  7. '--------------------------------
  8. '- Variable Declaration Section -
  9. '--------------------------------
  10.  
  11. DIM MAP%(3, 5, 5) '    create threedimentional array
  12. DIM cx% '              current x cell coordinate of player
  13. DIM cy% '              current y cell coordinate of player
  14. DIM KeyPress$ '        player key presses
  15.  
  16. '----------------------------
  17. '- Main Program Begins Here -
  18. '----------------------------
  19.  
  20. SCREEN _NEWIMAGE(250, 250, 32) '                                                                 create 250x250 32bit screen
  21. _TITLE "Simple Map" '                                                                            give window a title
  22. CLS '                                                                                            clear the screen
  23. DRAWMAP '                                                                                        draw the map
  24. cx% = 1
  25. cy% = 1
  26. DO '                                                                                             MAIN LOOP begins here
  27.     PCOPY 1, 0 '                                                                                 copy page 1 to current screen
  28.     CIRCLE (MAP%(2, cx%, cy%) + 24, MAP%(3, cx%, cy%) + 24), 20, _RGB32(255, 0, 0) '             draw player
  29.     PAINT (MAP%(2, cx%, cy%) + 24, MAP%(3, cx%, cy%) + 24), _RGB32(128, 0, 0), _RGB32(255, 0, 0)
  30.     _DISPLAY '                                                                                   update the screen without flicker
  31.     DO '                                                                                         KEY INPUT LOOP begins here
  32.         KeyPress$ = INKEY$ '                                                                     get a key (if any) that player pressed
  33.         _LIMIT 120 '                                                                             limit loop to 120 times per second
  34.     LOOP UNTIL KeyPress$ <> "" '                                                                 KEY INPUT LOOP back if no key
  35.     SELECT CASE KeyPress$ '                                                                      which key was pressed?
  36.         CASE CHR$(27) '                                                                          the ESC key
  37.             SYSTEM '                                                                             return to Windows
  38.         CASE CHR$(0) + CHR$(72) '                                                                the UP ARROW key
  39.             IF NOT MAP%(1, cx%, cy%) AND 1 THEN cy% = cy% - 1 '                                  move player up if no wall present
  40.         CASE CHR$(0) + CHR$(77) '                                                                the RIGHT ARROW key
  41.             IF NOT MAP%(1, cx%, cy%) AND 2 THEN cx% = cx% + 1 '                                  move player right if no wall present
  42.         CASE CHR$(0) + CHR$(80) '                                                                the DOWN ARROW key
  43.             IF NOT MAP%(1, cx%, cy%) AND 4 THEN cy% = cy% + 1 '                                  move player down if no wall present
  44.         CASE CHR$(0) + CHR$(75) '                                                                the LEFT ARROW key
  45.             IF NOT MAP%(1, cx%, cy%) AND 8 THEN cx% = cx% - 1 '                                  move player left if no wall present
  46.     END SELECT
  47. LOOP '                                                                                           MAIN LOOP back
  48.  
  49. '-----------------------------------
  50. '- Function and Subroutine section -
  51. '-----------------------------------
  52.  
  53. SUB DRAWMAP
  54.  
  55.     '*
  56.     '* draws a map based on the value of each map cell
  57.     '*
  58.  
  59.     SHARED MAP%() ' AS MAP ' need access to map array
  60.  
  61.     DIM x%, y% '          x,y map coordinates
  62.     FOR y% = 1 TO 5
  63.         FOR x% = 1 TO 5
  64.             READ MAP%(1, x%, y%)
  65.             MAP%(2, x%, y%) = (x% - 1) * 50
  66.             MAP%(3, x%, y%) = (y% - 1) * 50
  67.             IF MAP%(1, x%, y%) AND 1 THEN '                                                                                       is NORTH wall present?
  68.                 LINE (MAP%(2, x%, y%), MAP%(3, x%, y%))-(MAP%(2, x%, y%) + 49, MAP%(3, x%, y%)), _RGB32(255, 255, 255) '          yes, draw it
  69.             END IF
  70.             IF MAP%(1, x%, y%) AND 2 THEN '                                                                                       is EAST wall present?
  71.                 LINE (MAP%(2, x%, y%) + 49, MAP%(3, x%, y%))-(MAP%(2, x%, y%) + 49, MAP%(3, x%, y%) + 49), _RGB32(255, 255, 255) 'yes, draw it
  72.             END IF
  73.             IF MAP%(1, x%, y%) AND 4 THEN '                                                                                       is SOUTH wall present?
  74.                 LINE (MAP%(2, x%, y%), MAP%(3, x%, y%) + 49)-(MAP%(2, x%, y%) + 49, MAP%(3, x%, y%) + 49), _RGB32(255, 255, 255) 'yes, draw it
  75.             END IF
  76.             IF MAP%(1, x%, y%) AND 8 THEN '                                                                                       is WEST wall present?
  77.                 LINE (MAP%(2, x%, y%), MAP%(3, x%, y%))-(MAP%(2, x%, y%), MAP%(3, x%, y%) + 49), _RGB32(255, 255, 255) '          yes, draw it
  78.             END IF
  79.         NEXT x%
  80.     NEXT y%
  81.     PCOPY 0, 1 '                                                                                                                  save a copy of the map
  82.  
  83. '------------------------
  84. '- Program DATA section -
  85. '------------------------
  86.  
  87. '*
  88. '* Map cell values
  89. '*
  90. DATA 11,15,15,11,15,12,5,5,4,3,15,15,15,15,10,11,15,9,5,6,12,5,6,15,15
  91.  

QB64 help:

Code: QB64: [Select]
  1. SCREEN 7, 0, 1, 0
  2.  DIM x(10), y(10), dx(10), dy(10)
  3.  FOR a = 1 TO 10
  4.    x(a) = INT(RND * 320) + 1
  5.    y(a) = INT(RND * 200) + 1
  6.    dx(a) = (RND * 2) - 1
  7.    dy(a) = (RND * 2) - 1
  8.  DO
  9.  PCOPY 1, 0                           'place image on the visible page 0
  10.  CLS
  11.  _LIMIT 100                           'regulates speed of balls in QB64
  12.  FOR a = 1 TO 10    
  13.    CIRCLE(x(a), y(a)), 5, 15          'all erasing and drawing is done on page 1
  14.     x(a) = x(a) + dx(a)
  15.     y(a) = y(a) + dy(a)
  16.    IF x(a) > 320 THEN dx(a) = -dx(a): x(a) = x(a) - 1
  17.    IF x(a) < 0 THEN dx(a) = -dx(a): x(a) = x(a) + 1
  18.    IF y(a) > 200 THEN dy(a) = -dy(a): y(a) = y(a) - 1
  19.    IF y(a) < 0 THEN dy(a) = -dy(a): y(a) = y(a) + 1
  20.  LOOP UNTIL INKEY$ = CHR$(27) ' escape exit
  21.  


I thought to have worked PCOPY out.

Speaking about BITMAZE.
on line 21, the SCREEN _NEWIMAGE is set by default on 0, as a working and visualized page. Then the subroutine DRAWMAP draws the map in page 0 and line 82 copies the map, drawned in page 0, to page 1, while the working page is alway the visualized page 0. The DO loop in line 27 draws the circle in the visualized page 0, and the line 28 copies the map drawned in page 1, in page 0, deleting the preview circle of the preview loop, while the following lines drawn the new circle.

Speaking about the QB64 help.
on line 1, the working page is set to 1, while the visualized page is 0. the DO loop at line 10 draws the circles in background on page 1, and the PCOPY command in line 10 copies the circles in the visualized page 0 one time at loop, avoiding the flickering. Same result with _DISPLAY:

Code: QB64: [Select]
  1. SCREEN 7 ', 0, 1, 0
  2. DIM x(10), y(10), dx(10), dy(10)
  3. FOR a = 1 TO 10
  4.     x(a) = INT(RND * 320) + 1
  5.     y(a) = INT(RND * 200) + 1
  6.     dx(a) = (RND * 2) - 1
  7.     dy(a) = (RND * 2) - 1
  8.     '  PCOPY 1, 0 'place image on the visible page 0
  9.     CLS
  10.     _LIMIT 100 'regulates speed of balls in QB64
  11.     FOR a = 1 TO 10
  12.         CIRCLE (x(a), y(a)), 5, 15 'all erasing and drawing is done on page 1
  13.         x(a) = x(a) + dx(a)
  14.         y(a) = y(a) + dy(a)
  15.         IF x(a) > 320 THEN dx(a) = -dx(a): x(a) = x(a) - 1
  16.         IF x(a) < 0 THEN dx(a) = -dx(a): x(a) = x(a) + 1
  17.         IF y(a) > 200 THEN dy(a) = -dy(a): y(a) = y(a) - 1
  18.         IF y(a) < 0 THEN dy(a) = -dy(a): y(a) = y(a) + 1
  19.     NEXT
  20.     _DISPLAY
  21. LOOP UNTIL INKEY$ = CHR$(27) ' escape exit
  22.  

As I was saying, I was studying the Pete code to scroll the screen. In this code, PCOPY is used in a much complicated way, so I tried to work it out by implementig PCOPY on my y=kx^m code first. So, I have concluded that I don't have understood PCOPY statement.

Thi is my code, and it doesn't work this time:

Code: QB64: [Select]
  1. CONST L% = 1024
  2. CONST H% = 768
  3. CONST rosso = _RGB32(255, 0, 0)
  4. CONST bianco = _RGB32(255, 255, 255)
  5.  
  6. TYPE funzione
  7.     x AS LONG
  8.     y AS LONG
  9.  
  10. DIM SHARED schermo&, grafico1&, grafico2&
  11. DIM keypress$
  12.  
  13. schermo& = _NEWIMAGE(L%, H%, 32)
  14. grafico1& = _NEWIMAGE(800, 600, 32)
  15. grafico2& = _NEWIMAGE(800, 600, 32)
  16.  
  17. disegno
  18.     keypress$ = INKEY$
  19.     IF keypress$ = CHR$(13) THEN
  20.         disegno
  21.     END IF
  22. LOOP UNTIL keypress$ = CHR$(27)
  23. _FREEIMAGE grafico1&
  24. _FREEIMAGE grafico2&
  25.  
  26. SUB disegno ()
  27.     CONST A% = 1 'per prendere un punto ogni A% pixel.
  28.     CONST k! = 1 ' coefficiente della x.
  29.     CONST m% = 2 'esponente della x.
  30.     CONST s! = 5 * k! 'amplificazione di scala delle ascisse.
  31.     DIM titolo1$, titolo2$, punti$, istruzioni$
  32.     DIM punti%, i%, n% 'valori di x considerati da -punti% a +punti%, i% e n% sono contatori.
  33.     REDIM funzione(0) AS funzione
  34.     i% = 1
  35.     DO 'disegna cartiglio, assi, scrive istruzioni e chiede il n. di punti. non accetta come valore "0".
  36.         SCREEN schermo&, , 1, 0 'imposta schermo& come pagina di lavoro e visualizzata.
  37.         _CLEARCOLOR rosso, grafico2&
  38.         CLS
  39.         titolo1$ = "RAPPRESENTAZIONE DELLA FUNZIONE y = kx^m (k =" + STR$(k!) + " ; m =" + STR$(m%) + ")"
  40.         LOCATE 2, ((L% / 8 - LEN(titolo1$)) \ 2): PRINT titolo1$
  41.         titolo2$ = "(Fattore di amplificazione delle ascisse: s = " + STR$(s!) + ")"
  42.         LOCATE 3, ((L% / 8 - LEN(titolo2$)) \ 2): PRINT titolo2$
  43.         PCOPY 1, 0
  44.         SCREEN grafico1&, , 2, 0
  45.         CLS
  46.         LINE (0, 0)-(799, 599), rosso, B
  47.         LINE (_WIDTH(grafico1&) \ 2 - 1, 31)-(_WIDTH(grafico1&) \ 2 - 1, 568), bianco
  48.         LINE (31, _HEIGHT(grafico1&) \ 2)-(768, _HEIGHT(grafico1&) \ 2), bianco
  49.         PSET (_WIDTH(grafico1&) \ 2, 31), bianco: DRAW "F20": PSET (_WIDTH(grafico1&) \ 2, 31), bianco: DRAW "G20": LOCATE 32 / 16, _WIDTH(grafico1&) \ 2 \ 8 + 1: PRINT "y"
  50.         PSET (768, _HEIGHT(grafico1&) \ 2), bianco: DRAW "G20": PSET (768, _HEIGHT(grafico1&) \ 2), bianco: DRAW "H20": LOCATE _HEIGHT(grafico1&) \ 2 \ 16 + 1, 768 \ 8 + 2: PRINT "x"
  51.         LOCATE _HEIGHT(grafico1&) \ 2 \ 16 + 2, _WIDTH(grafico1&) \ 2 \ 8 - 1: PRINT "0"
  52.         _PUTIMAGE ((L% - 800) \ 2, (H% - 600) \ 2), grafico1&, schermo&
  53.         PCOPY 2, 0
  54.         SCREEN schermo&, , 1, 0 'le iscruzioni che seguono agiscono su schermo&, che e' visualizzato.
  55.         punti$ = "Inserire il n. di punti in ascissa: "
  56.         LOCATE 5, ((L% / 8 - LEN(punti$) - 1) \ 2)
  57.         PRINT punti$;
  58.         INPUT "", punti%
  59.         PCOPY 1, 0
  60.     LOOP WHILE LTRIM$(STR$(punti%)) = "0"
  61.     SCREEN grafico2&, , 3, 0 'le istruzioni che seguono agiscono in background su grafico2&.
  62.     n% = -punti%
  63.     DO UNTIL n% = punti% + 1 ' crea il vettore con i valori di x e y i cui elementi vanno da -punti% a +punti%. disegna un cerchio colorato per ogni punto, traslando il grafico in modo che l'orgine non sia in alto a sinistra, ma su "0".
  64.         REDIM _PRESERVE funzione(i%) AS funzione
  65.         funzione(i%).x = n%
  66.         funzione(i%).y = k! * (funzione(i%).x) ^ m
  67.         CIRCLE (s! * A% * funzione(i%).x + 399, A% * funzione(i%).y + 299), 2, rosso
  68.         PAINT (s! * A% * funzione(i%).x + 399 + 1, A% * funzione(i%).y + 299 + 1), rosso
  69.         i% = i% + 1
  70.         n% = n% + 1
  71.     LOOP
  72.     FOR i% = 1 TO UBOUND(funzione) - 1 ' congiunge i punti.
  73.         LINE (s! * A% * funzione(i%).x + 399, A% * funzione(i%).y + 299)-(s! * A% * funzione(i% + 1).x + 399, A% * funzione(i% + 1).y + 299), rosso
  74.     NEXT i%
  75.     _PUTIMAGE (0, 599)-(799, 0), grafico2&, grafico1&, (0, 0)-(799, 599) 'mette grafico2& su grafico1&, invertendo le x, in modo che le y postive siano verso l'alto e non verso il basso.
  76.     _PUTIMAGE ((L% - 800) \ 2, (H% - 600) \ 2), grafico1&, schermo& 'mette grafico1& su schermo&, il quale, essendo visualizzato, permette di vedere il grafico definitivo.
  77.     PCOPY 3, 0
  78.     SCREEN schermo&, , 1, 0 'le iscruzioni che seguono agiscono su schermo&, che e' visualizzato.
  79.     istruzioni$ = "Premere INVIO per un nuovo calcolo, ESC per terminare."
  80.     LOCATE 45, ((L% / 8 - LEN(istruzioni$)) \ 2): PRINT istruzioni$
  81.     SELECT CASE UBOUND(funzione)
  82.         CASE IS <= 40
  83.             FOR i% = 1 TO UBOUND(funzione)
  84.                 LOCATE 6 + (UBOUND(funzione) - (UBOUND(funzione) - i%)), 16
  85.                 PRINT STR$(i%) + ") x = " + STR$(funzione(i%).x) + "; y = " + STR$(funzione(i%).y)
  86.             NEXT i%
  87.         CASE ELSE
  88.             FOR i% = 1 TO 40
  89.                 LOCATE 6 + (UBOUND(funzione) - (UBOUND(funzione) - i%)), 16
  90.                 PRINT STR$(i%) + ") x = " + STR$(funzione(i%).x) + "; y = " + STR$(funzione(i%).y)
  91.             NEXT i%
  92.     END SELECT
  93.     PCOPY 1, 0
  94.  

the idea is the following:

on line 39 schermo& is set as the working page 1, while the visualized page is 0.
in line 46, page 1 is copied on page 0.

on line 47 grafico1& is set as the working page 2, while the visualized page is 0.
in line 56, page 2 is copied on page 0.

on line 57 schermo& is again set as the working page 1, while the visualized page is 0.
in line 62, page 1 is copied on page 0.

on line 64 grafico2& is set as the working page 3, while the visualized page is 0.
in line 80, page 3 is copied on page 0.

on line 81 schermo& is again set as the working page 1, while the visualized page is 0.
in line 96, page 1 is copied on page 0.

But It doesn't work.

I have done many attempts, for example:

on line 39 schermo& is set as the working page 1, while the visualized page is 0.
in line 46, page 1 is copied on page 0.

on line 47 grafico1& is set as the working page 2, while the visualized page is 0.
in line 56, page 2 is copied on page 0.

on line 57 schermo& is set as the working page 3, while the visualized page is 0.
in line 62, page 3 is copied on page 0.

on line 64 grafico2& is set as the working page 4, while the visualized page is 0.
in line 80, page 4 is copied on page 0.

on line 81 schermo& is again set as the working page 5, while the visualized page is 0.
in line 96, page 5 is copied on page 0.

I have also tried solutions with things like this:
PCOPY 3,2
PCOPY 2,1
PCOPY 1,0

Nothig.

Why?

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: graphs with QB64 and how to scroll the screen.
« Reply #16 on: January 22, 2021, 07:52:09 am »
PCOPY is a rather simplistic command, and you’re overthinking it.  At its heart, all it does is make a COPY of a screen (PAGE of video memory).  PCOPY = PAGE COPY...

At start, you have NO copies, so all PCOPY values are going to just be blank screens.

A value of 0 is the original, visible, display.  (The screen you see by default.)

PCOPY 0, 1 will copy that screen page (0) over to a new screen page(1).

PCOPY 1, 0 will then copy the screen page (1), back over to screen page (0).

Generally speaking, the above is the simplest, and most common, way PCOPY is used.  Make a copy of a screen, pop-up an alert or notification, then restore the screen.

At the end of the day, that’s all PCOPY does for us: makes a copy of a screen for us.  ;)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #17 on: January 23, 2021, 07:24:12 am »
Hi Bartok
I see you're dealing with PCOPY https://www.qb64.org/wiki/PCOPY
a QB45 keyword that let the user copy a video memory page to another
Quote
PCOPY sourcePage%, destinationPage%

I remember that in QB45 the video pages have a digit as name... and the first digiti is always 0. So the video page showed onto the screen of PC is the 0 page for default if you don't change this manually by code.
The number of video pages avaiable depends from the kind of settings of  video memory that we build using SCREEN instruction https://www.qb64.org/wiki/index.php/SCREEN.

The old QB45 has only this video options:
Quote
  LEGACY SCREEN MODES AT A GLANCE

 Screen      Text           Graphics          Colors      Video    Text      Default
  Mode   Rows   Columns   Width   Height  Attrib.   BPP   Pages    Block    QB64 Font

   0   25/43/50  80/40    No graphics     16/16 DAC  4     0-7     -----    _FONT 16
   1      25      40      320     200     16/4 BG    4     none    8 X 8    _FONT 8
   2      25      80      640     200      2/mono    1     none    8 X 8    _FONT 8
   .................................................................................
   7      25      40      320     200     16/16 DAC  4     0-7     8 X 8    _FONT 8
   8      25      80      640     200     16/16      4     0-3     8 X 8    _FONT 8
   9      25      80      640     350     16/64 DAC  4     0-1     8 X 14   _FONT 14
  10      25      80      640     350     4/2 GScale 2     none    8 X 14   _FONT 14
  11     30/60    80      640     480      2/mono    1     none    8 X 16   _FONT 16
  12     30/60    80      640     480     16/262K    4     none    8 X 16   _FONT 16
  13      25      40      320     200     256/65K    8     none    8 X 8    _FONT 8
so using SCREEN 7 you have 8 videopages from 0 (that visible) to 7. Instead if you use SCREEN 2 or SCREEN 11 you have only one video page the number 0.

But if you use SCREEN into QB64 advanced mode , for example SCREEN _NEWIMAGE(X,Y,32), do you know how many have videopages you got?
Only one, that you have created with _NEWIMAGE https://www.qb64.org/wiki/NEWIMAGE and its number  is a LONG value that is called handle but you can think about it as the ID used in the login routines.

In QB64 advanced mode, you needn't use PCOPY and many video pages! Think about the screen of pc as a canvas or a paper. You simply can create as many as canvas you need and using _PUTIMAGEhttps://www.qb64.org/wiki/PUTIMAGE and _COPYIMAGE https://www.qb64.org/wiki/NEWIMAGE you can copy each canvas on the video screen. You can find interesting also  _DEST  https://www.qb64.org/wiki/DEST and _SOURCEhttps://www.qb64.org/wiki/SOURCE kewywords.


Feedback for you code, using PCOPY, doesn't work

1.
Code: QB64: [Select]
  1.   SCREEN schermo&, , 1, 0 'imposta schermo& come pagina di lavoro e visualizzata.
  2.        
penso che questo crei uno schermo usando Schermo& come prototipo e imposta una pagina video 1 non definita come destinazione dell'output grafico e la pagina di default (0) come pagina video visualizzata
/ i think this creates a screen using Screen & as prototype and sets an undefined 1 video page as the target of the graphic output and the default page (0) as the displayed video page

2.
Code: QB64: [Select]
  1.  _CLEARCOLOR rosso, grafico2&
con Clearcolor imposti il rosso come colore trasparente dell'immagine Grafico2&  quando sarà copiata
/ with Clearcolor you set red as the transparent color of the Graphic2 & image when it is copied
....

Programming isn't difficult, only it's  consuming time and coffee

Offline bartok

  • Newbie
  • Posts: 80
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #18 on: January 23, 2021, 09:10:15 am »
Thank's you very much SMcNeill and Tempodi Basic,
Quote
But if you use SCREEN into QB64 advanced mode , for example SCREEN _NEWIMAGE(X,Y,32), do you know how many have videopages you got?
Only one,

Quote
n QB64 advanced mode, you needn't use PCOPY and many video pages! Think about the screen of pc as a canvas or a paper. You simply can create as many as canvas you need and using _PUTIMAGE

I think this explains everything. In conclusion: better to avoid PCOPY.

Quote
You can find interesting also  _DEST  https://www.qb64.org/wiki/DEST and _SOURCEhttps://www.qb64.org/wiki/SOURCE kewywords.

in fact in my previous code (the one that it works), I have massively used _DEST.

_CLEARCOLOR rosso, grafico2&

Yes, it is also included in the previous working code and it is required to clear "grafico2&" (the image where the function is drawn in red), after each points input. By using CLS instead:
_DEST grafico2&
CLS
when _PUTIMAGE put "grafico2&" in "grafico1&" (containing the coordinate system), it will covers it. And I coudn't use only one image& instead of "immagine1&" and "immagine2&", though they have the same format and are exactly overlapping, because it was necessary to manipulate only an image containing the function, in order to translate it from the upper left screen, on the center and put it up side down.

Offline bartok

  • Newbie
  • Posts: 80
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #19 on: January 24, 2021, 09:54:02 am »
Also thanks to Pete's code I found out how to scroll the screen:
Code: QB64: [Select]
  1.  
  2. CONST verde = _RGB32(0, 127, 0)
  3. CONST L% = 1024
  4. CONST H% = 768
  5. CONST righe% = H% \ 16 '=48
  6. CONST colonne% = L% \ 8 '=128
  7.  
  8. DIM testo$
  9. REDIM testo1$(1)
  10.  
  11. lunghezza% = (righe% - 1) * colonne% '=(47*128)=6016
  12.  
  13. schermo& = _NEWIMAGE(L%, H%, 32)
  14. SCREEN schermo&: _DEST schermo&: COLOR verde
  15. READ testo$
  16. i% = 1
  17. n% = 0
  18.     REDIM _PRESERVE testo1$(i%)
  19.     testo1$(i%) = MID$(testo$, n% * lunghezza% + 1, lunghezza%)
  20.     k% = LEN(testo1$(i%))
  21.     n% = n% + 1
  22.     i% = i% + 1
  23. LOOP UNTIL k% < lunghezza%
  24. i% = 1
  25.     VIEW PRINT 1 TO righe%
  26.     CLS
  27.     PRINT testo1$(i%)
  28.     DO
  29.         keypress$ = INKEY$
  30.     LOOP UNTIL keypress$ <> ""
  31.     SELECT CASE keypress$
  32.         CASE CHR$(0) + "H"
  33.             IF i% > 1 THEN i% = i% - 1
  34.         CASE CHR$(0) + "P"
  35.             IF i% < UBOUND(testo1$) THEN i% = i% + 1
  36.         CASE CHR$(0) + "I"
  37.             i% = 1
  38.         CASE CHR$(0) + "Q"
  39.             i% = UBOUND(testo1$)
  40.     END SELECT
  41. LOOP UNTIL keypress$ = CHR$(27)
  42.  
  43. DATA "Ammetto di non essere molto ispirato nella stesura del commento sul romanzo in questione, se no le frasi avrebbero già cominciato ad accavallarsi affollandosi nella mia mente e le mie dita ticchetterebbero senza sosta sulla tastiera. Tuttavia ciò non è dovuto a mancanza d’idee, ma bensì alla difficoltà di dare un ordine a ciò che si può scrivere su un testo così complesso e articolato, oltre che infarcito di filosofia taoista e buddista. Fondamentalmente la trama è molto semplice: si narra dell’evoluzione mentale del protagonista Pao-Yü nel contesto di un’aristocratica e ricca famiglia Cinese. Ciò che rende però impegnativa la lettura è la grande quantità di personaggi che vi compare tanto che mi è stato indispensabile segnarmi i nomi e le relative caratteristiche principali su un foglio man mano che leggevo. Ciò dapprincipio è faticoso ed è difficile raccapezzarsi in un intreccio così affollato, ma dopo le prime 100 pagine si riesce ad ambientarsi. Terminata la lettura non ho segnato più di 50-60 personaggi veramente importanti per lo sviluppo del romanzo, di cui solo una 10-15ina sono quelli fondamentali intorno ai quali ruota la storia e di cui, infine, i protagonisti veri e propri sono 2: Pao-Yü e Tai-Yü, cioè Gioiazzurra. Lo scopo dell’intero romanzo è quello di dimostrare l’inutilità e la caducità delle cose terrene attraverso la narrazione delle peripezie spirituali del protagonista e del suo conseguente graduale Risveglio. Ma non penso che sia il caso di discutere in questa relazione di tali argomenti visto che sono già ampiamente trattati nella prefazione e nel commento in fondo al libro. Piuttosto vorrei parlare di alcune mie impressioni e riflessioni. Tanto per cominciare “Hung-lou mêng” non è un libro abbordabile da tutti: oltre alla lunghezza e alle motivazioni già sopra descritte, a molti potrebbe sembrare un racconto in cui si parla di un gruppo di persone che non ha niente da fare dalla mattina alla sera, che vive di gozzoviglie (es. i continui banchetti luculliani), giochetti amorosi (es. quelli di Pao-Yü e delle sue amichette, quelli di Chia Lien e Hsieh-P’an), sotterfugi, meschinità (es. le macchinazioni di Donna Fenice per rovinare la povera seconda Yü e accumulare soldi a palate in un modo del tutto fine a sé stesso e senza mettere in pratica i saggi consigli della defunta Donna Jung, cioè K’O-Ch’ing) e  superstizioni (es. l’importanza attribuita alla Pietra di Giada, la chiusura degli spiriti maligni del Giardino nei vasi). Tutti questi aspetti, che un animo materialista individuerebbe arricciando il naso, sono senz’altro veri, ma non è tutto! Secondo me, ciò che rende “Il Sogno della Camera Rossa” un vero capolavoro, è il modo con cui l’autore riesce ad inglobare l’apparenza in una visione così ampia da renderla un tutt’uno con il significato metaforico e nascosto. Provo a spiegarmi meglio con un esempio che non ha niente a che fare con il libro, ma che può rendere l’idea di ciò che intendo. Se si osserva un oggetto, siamo in grado di vedere solo una minima gamma dei suoi reali colori, ma ciò non implica che quelli che non vediamo, non esistano. La scoperta che ce ne sono tanti altri che non siamo in grado di scorgere, non vuol dire che ciò che vediamo sia sbagliato. Con l’esempio appena descritto potrei fare una proporzione che si ricollega al libro: “l’apparenza sta al colore che vediamo come il significato nascosto sta a tutto ciò che non ci è dato di vedere”. Ciò significa una cosa molto semplice in fondo: l’uno non esclude l’altro e non esistono compartimenti stagni. Dunque non è sbagliata l’interpretazione “superficiale” e materialistica del libro secondo la quale esso sembrerebbe un ozioso e frivolo racconto, ma essa è semplicemente una parte del tutto. Bisogna dunque saper guardar oltre, ma senza rinnegare niente. Troppo comodo dire che tutto è una metafora di qualcos’altro! A conferma di ciò che ho scritto porto un esempio estrapolato dal romanzo riguardante la Pietra di Giada. Una persona concreta e pratica si chiederebbe perché venga attribuita tanta importanza ad una pietruzza e taccerebbe di “superstizione” il comportamento dei personaggi, dell’autore stesso e troverebbe del tutto insensato che Pao-Yü diventi apatico solo perché ha smarrito un sasso. Ciò indurrebbe a pensare che la Pietra in realtà sia detentrice dell’ “io” più intimo e profondo del protagonista e che quindi egli, senza di essa, sia solo un involucro senza contenuto. Quindi si sarebbe tentati di credere che l’oggetto in questione sia più di ciò che è. Ma poi alla fine del libro cosa si scopre? Quando il seguace di Tao torna a reclamare i soldi per la restituzione della Pietra, Pao-Yü, dopo il fulmineo Risveglio, capisce che il sacerdote in realtà rivuole indietro quella e non i soldi. Il protagonista, ormai illuminato, si rende conto che la Pietra è lui stesso (in senso metaforico) e che essa, in quanto oggetto, è sempre stata solo una sorta di “memento” alle sue grandi potenzialità: non era mai stata nient’altro che una semplice pietra (seppur di giada) e, di conseguenza, non si fa scrupoli a volergliela ridare in quanto non sa più che farsene. L’insistenza dei suoi parenti nell’impedirglielo è dunque vera superstizione e in tal caso si può ben notare che il giudizio del lettore concreto e con i “piedi per terra” coincida con quello dell’autore che fa capire chiaramente che l’essenza profonda dell’essere va aldilà del mero possesso di un oggetto. Dunque la pietra viene presentata prima come qualcosa di soprannaturale e dopo come un semplice sasso. È questo ciò che mi piace del romanzo: la visione ampia e ambigua. Esso è concreto? Metaforico? Astratto? Da interpretare? Frivolo? La risposta è affermativa e negativa allo stesso tempo. Tutto dipende dal significato che si dà alle parole… il problema è sempre questo. Se per “concreto” s’intende un racconto che si basa solo su ciò che è scientificamente provabile, “il Sogno della Camera Rossa” non è certo concreto. Ma se con questo termine intendiamo un modo di pensare analitico che non esclude niente a meno che non sia impossibile e che lascia tante “porte” aperte, allora questo romanzo, a suo modo, lo è. Per esempio, chi può trovare una dimostrazione scientifica dell’inesistenza degli spiriti? La scienza ha ben altro da fare che pensare a dimostrare queste cose. Se esistono davvero forse un giorno si avranno strumenti adatti per verificarlo, ma discutere della gamma di tutto ciò che è possibile anche se non dimostrabile (o non ancora) è senz’altro un atteggiamento concreto. Le risposte più esaurienti alle domande poste poco sopra penso che siano “sì” a tutte perché, nella mia visione dell’ampiezza del significato delle parole, nessuna esclude l’altra. Ciò che ho scritto fin’ora è la mia interpretazione del libro. Gabriele Foccardi nell’ultima frase del suo commento “Immagini di giada e percorsi del sogno” scrive: “Accedere al Sogno della Camera Rossa” è relativamente facile: non esiste una chiave per la verità, ciascuno può usare semplicemente la propria”. Da quanto ho scritto si può dedurre che io sia pienamente d’accordo con questa affermazione. Non ho molto altro da aggiungere perché il mio pensiero l’ho già esposto e dilungarmi nell’analisi dei personaggi e delle loro interazioni non avrebbe senso visto che chi legge questa relazione, ha già letto il libro. Però voglio ancora riportare una mia impressione sullo stile con cui questo libro è scritto. Ovvio che non posso darne un giudizio completo perché l’ho letto in Italiano, cioè in una lingua alfabetica priva d’ideogrammi, tuttavia ho avuto lo stesso la possibilità di apprezzare la struttura dell’intreccio. Mi è molto piaciuto il fatto che il libro sia finito con gli stessi 2 personaggi con cui è cominciato: Yü-Ts’un e Shih-Yin. Essi non sono i protagonisti, ma all’inizio del romanzo hanno la funzione di introdurli. Una volta che ciò accade, del primo non si sa quasi più niente e del secondo si sa solo che s’incammina con un bonzo per una strada senza che si riesca a capire se questa sia una metafora della sua morte o se invece sia sulla strada del Risveglio. Inoltre anche della povera Loto (figlia di Shih-Yin) non si sa più niente fin almeno alla metà del libro quando il suo nome ricompare nel numero delle serve, comunque non si ha la sensazione che per lei giustizia sia stata fatta perché era nata in una famiglia benestante e poi fu rapita per diventar serva. Insomma, anche se tutta la storia si svolge lontano da questi 3 personaggi, per l’intera durata del libro ho avuto come l’impressione che una parentesi non fosse stata chiusa. Yü-Ts’un è comparso 2 volte durante lo sviluppo della storia: la prima in un colloquio con Pao-yü sotto la supervisione di Messer Chêng e il secondo quando incontra l’usuraio Ni (Diamante Ubriaco) steso sulla strada. Ogni volta mi dicevo “Ecco Yü-Ts’un! Chissà che fine aveva fatto e chissà che utilità ha in tutta questa storia”. Solo alla fine la parentesi si chiude dando una sensazione di “tutto compiuto” e di “cerchio che si chiude”, cioè quando, seguendo l’esempio di Shih-Yin, egli s’incammina verso la strada dell’Illuminazione con un effetto complementare rispetto a come il romanzo era cominciato. Infatti all’inizio Shih-Yin era il promotore della fortuna di Yü-Ts’un verso i beni terreni, alla fine è il promotore del suo Risveglio. Ciò, anche su un piano grafico, è del tutto paragonabile ad una parentesi che si chiude: uguale, ma opposta a quella che apre. Inoltre, è sempre grazie a Yü-Ts’un che anche la situazione di Loto trova il suo giusto epilogo: se Yü-Ts’un non avesse incontrato Diamante Ubriaco sulla strada, quest’ultimo non sarebbe finito in prigione, se ciò non fosse accaduto la sua famiglia non avrebbe chiesto l’aiuto del giardiniere Chia-Yün (parente povero della potente famiglia) affinché questi ultimi intercedessero per Ni presso le autorità, se ciò non fosse accaduto Chia-Yün non avrebbe avuto modo di rendersi conto della bassezza dei suoi parenti ricchi che lo disdegnano solo perché è povero e di conseguenza i parenti di Ni non avrebbero interpretato tale disinteresse come una mancanza di riconoscenza dello stesso Chia-Yün nei confronti di Diamante Ubriaco che invece in passato gli permise di trovare lavoro grazie ad un regalo di soldi. Inoltre, se non ci fosse stata la cattiva interpretazione delle intenzioni del giardiniere, Ni non si sarebbe arrabbiato a tal punto da decidere di vendicarsi sui Chia diventando “il luccio che sconvolge lo stagno delle carpe” e di conseguenza l’aristocratica famiglia non sarebbe caduta in disgrazia. Infine, se ciò non fosse accaduto, Hsieh-P’an (che era in prigione per l’omicidio involontario di un cameriere durante un accesso d’ira) non sarebbe stato in galera così a lungo e non si sarebbe ravveduto dalla sua pessima condotta e dunque non avrebbe deciso di mettere la “testa a posto” e sposare la povera Loto ridandole quella dignità che le era stata tolta quando fu rapita. Tutto torna! Il piacere che si prova leggendo questo romanzo è simile a quello che si sente dopo aver risolto una funzione matematica. La sospensione di cui ho scritto riguardo a Yü-Ts’un/Shish-Yin comunque è anche riscontrabile nella coppia Pao-Yü/Gioiazzurra, la cui storia, che era cominciata con la pianta Perla Purpurea irrorata dal Custode della Fulgida Pietra Divina, ha il suo epilogo con l’adempimento della promessa da parte della pianta di ringraziare con una vita di lacrime colui che l’aveva curata annaffiandola di rugiada. Solo un personaggio mi ha lasciato perplesso: “il Freddo Cavaliere”. Egli (se ben ricordo) era uno dei compagni di scuola di Pao-Yü e del suo amico Ch’in Chung e aveva un nome ben preciso che non ho segnato perché all’inizio mi pareva una semplice comparsa. Poi nel 32° capitolo compare sotto il nome di Freddo Cavaliere. Mi ha impressionato il fatto che venga attribuito un tale epico epiteto ad un personaggio che aveva interpretato in uno spettacolo teatrale la parte di un personaggio femminile attirando le attenzioni di Hsieh-P’an (che poi viene picchiato a sangue). Inoltre è misteriosa la sua scomparsa insieme al sacerdote di Tao verso la Porta del Grande Vuoto. Anche Shih-Yin era sparito dalla scena del libro in un modo simile, ma poi alla fine è ricomparso (come ho scritto prima). Il Freddo Cavaliere invece scompare per sempre. Non capisco se sia morto o se abbia intrapreso la strada dell’Illuminazione. Gli ultimi 2 paragrafi del capitolo 33 lasciano adito a tutte le interpretazioni. Infatti, l’inaspettato risveglio del Freddo Cavaliere nel tempio Taoista e l’affermazione del sacerdote “Non lo so neanch’io, ma non importa. So soltanto che abbiamo fatto una breve sosta” e il brivido provato dal Freddo Cavaliere dopo questa frase, mi farebbero pensare che egli si fosse ucciso in seguito al suo comportamento nei confronti della terza Yü. Dunque forse si era svegliato in un’altra dimensione e la sosta cui alludeva il sacerdote era stata la sua vita. Quindi, secondo questa interpretazione, il cammino del Freddo Cavaliere con il Taoista sarebbe una metafora del susseguirsi delle esistenze e delle incarnazioni verso la Purificazione. Però tutto ciò potrebbe anche essere interpretato come l’intenzione di seguire il Taoista lungo la strada del Risveglio come fece Shih-Yin. Infine concludo con una constatazione che è senz’altro scontata, ma che denota quanto sia difficile astrarsi dalla propria cultura: ho appena finito di leggere un romanzo di 700 pagine in cui compaiono non meno di 100 personaggi con almeno altre 2 centinaia di comparse, eppure nella mia mente non c’era nessun cinese, ma bensì solo bianchi con caratteristiche somatiche occidentali. Gioiazzurra per esempio me l’immaginavo bionda, alta, gracile e con gli occhi azzurri… magari con qualche lentiggine. Inoltre le numerose scene dei pranzi sfarzosi e il clima frivolo e giocoso ad essi connesso me li figuravo del tutto simili a quelli che si “respirano” leggendo l’autobiografia di Casanova. Ho interpretato e immaginato tutto in chiave indubbiamente europea. Forse questo è da attribuire, oltre che all’abitudine, anche all’impossibilità di cogliere le allusioni e le immagini che sono caratteristiche della scrittura a ideogrammi. Per esempio la predestinazione del matrimonio tra Pao-Yü e Pao-Ch’ai è già implicita nel prefisso “Pao” come del resto l’ava stessa afferma a dimostrazione che la sua scelta di far sposare i 2 personaggi fosse giusta. Ma ho notato che anche Tai-Yü (sebbene venga quasi sempre chiamata Gioiazzurra) ha qualcosa in comune con il protagonista: il suffisso “Yü”. Forse questo è un caso, o forse è un mezzo attraverso il quale l’autore ci dà un ulteriore implicito (oltre che grafico) indizio del diverso tipo di legame tra i 2 protagonisti, mettendo quindi in evidenza che si tratta di un genere di predestinazione complementare e opposto rispetto al primo? Queste comunque sono estrapolazioni di uno che di Cinese non sa niente, ma è sicuro che leggere un romanzo cinese in una lingua alfabetica dà automaticamente e inevitabilmente un’ipostazione troppo occidentale a tutto il testo perché impedisce di cogliere quelle sfumature, quegli opposti, quegli equilibri che nella lingua originale risulterebbero evidenti. Forse quel senso di complementarietà di cui prima ho riportato un esempio parlando della comparsa di Shih-Yin e Yü-Ts’un all’inizio e alla fine della storia e della funzione del primo nell’uno e nell’altro caso rispetto all’evoluzione spirituale del secondo, un lettore del testo in Cinese potrebbe riscontrarlo in ogni frase.Z"
  44.  


But I have a question. How we can see, at the end of each page (except the last one), there are 47 filled rows and 1 empty row. But the number of rows in order to exploit the entire screen is set in line 6: 48 rows.

If in line 12 I remove "-1", we always have 1 empty row at the and, while the first row of the text is no loger visibile. So, it seems there is no way to fill the all 48 rows, but at most 47. Why?

But the "problem" doesn't end here: what I have just written only applies if line 28 is active. Line 28 tells QB64 to view all the 48 rows, but, as I said, only 47 are displayed. Furthermore, if a deactivate line 28, we will see that at the end of each page there are now 2 empty rows and the filled rows became now 46, while the 2 first rows of the text are no longer visible. So, to avoid that, I have to put, in line 12 "-2", with always only 46 filled rows. Why?

An other question is:

If I replace line 12 with:
CONST lunghezza% = (righe% - 1) * colonne%

QB64 doesn't calculate lunghezza% as (48-1)*128, but 48*128.

So:
CONST a% = righe% - 1
PRINT a%---------------->a%=48 and not 47
SLEEP
CONST b% = (righe%) - 1
PRINT b%--------------->b%=47
SLEEP
CONST c% = ((righe%) - 1)*colonne%------>invalid CONST expression.

why? CONST in line 6 and 7 are calculated correctly.
« Last Edit: January 24, 2021, 10:04:15 am by bartok »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #20 on: January 24, 2021, 11:12:03 am »
REDIM testo1$(1)   ' <<< 2 slots at index 0 and 1

REDIM _PRESERVE testo1$(i%) ' <<< maintains 0 as lower bound of array

You've started with an zero based array, so I think removing the -1 might change the elements you access.

Sorry hard for me to tell definitely if that is what the problem is without English words for clues, but I've made the mistake myself
REDIM testo1$(1)  '<<<< assuming a base 1, 1 element array


Update: Oh I see Option Base 1 at top now, oh well...


Update 2: Oh hey! I just remembered CONST has trouble with suffixes might be fixed in dev v 1.5

Yeah!
Code: QB64: [Select]
  1. CONST righe = 48, colonne = 128
  2. CONST a = righe - 1
  3. CONST b = (righe) - 1
  4. CONST c = ((righe) - 1) * colonne
  5.  

Works fine! :)
« Last Edit: January 24, 2021, 12:24:56 pm by bplus »

Offline bartok

  • Newbie
  • Posts: 80
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #21 on: January 25, 2021, 01:32:34 pm »
Thanks bplus,
I try to explain with the code in English my previous issue.

When we launch the program, in each page (except the last one, when the text finishes), there are 48 rows, as I had settles in line 13: 47 filled rows and 1 empty row. Why there is the blank row?

If in line 22 I remove "-1", we always have 1 empty row at the and, while the first row of the text of the screen is no loger visibile. So, it seems there is no way to fill the all 48 rows, but at most 47. Why?

But the "problem" doesn't end here: what I have just written only applies if line 38 is active. Line 38 tells QB64 to view all the 48 rows, but, as I said, only 47 are displayed. Furthermore, if a deactivate line 38, we will see tthat in each page there are always 48 rows, but this time with 2 empty rows and the filled rows became now 46. some ideas about it?


Code: QB64: [Select]
  1. 'PAG UP: first page
  2. 'PAG DOWN: last page
  3. 'ARROW KEY UP: page up
  4. 'ARROW KEY DOWN: page down
  5.  
  6.  
  7. _TITLE "SCROLL TEST"
  8.  
  9. CONST green = _RGB32(0, 127, 0)
  10. CONST L% = 1024
  11. CONST H% = 768
  12. CONST rows% = H% \ 16 '=48
  13. CONST columns% = L% \ 8 '=128
  14.  
  15. DIM i%, n%
  16. DIM text$, keypress$
  17. DIM monitor&
  18.  
  19. REDIM visibleText$(1)
  20.  
  21. textLEN% = (rows% - 1) * columns% '=(47*128)=6016
  22.  
  23. monitor& = _NEWIMAGE(L%, H%, 32)
  24. SCREEN monitor&: _DEST monitor&: COLOR green
  25. READ text$
  26. i% = 1
  27. n% = 0
  28. DO ' create the array that divides the text into "i" texts with LEN corresponding to the visible text on the monitor.
  29.     REDIM _PRESERVE visibleText$(i%)
  30.     visibleText$(i%) = MID$(text$, n% * textLEN% + 1, textLEN%)
  31.     n% = n% + 1
  32.     i% = i% + 1
  33. LOOP UNTIL LEN(visibleText$(i% - 1)) < textLEN%
  34. i% = 1
  35. DO ' it displays the visible texts.
  36.     VIEW PRINT 1 TO rows%
  37.     CLS
  38.     PRINT visibleText$(i%)
  39.     DO
  40.         keypress$ = INKEY$
  41.     LOOP UNTIL keypress$ <> ""
  42.     SELECT CASE keypress$
  43.         CASE CHR$(0) + "H"
  44.             IF i% > 1 THEN i% = i% - 1
  45.         CASE CHR$(0) + "P"
  46.             IF i% < UBOUND(visibleText$) THEN i% = i% + 1
  47.         CASE CHR$(0) + "I"
  48.             i% = 1
  49.         CASE CHR$(0) + "Q"
  50.             i% = UBOUND(visibleText$)
  51.     END SELECT
  52. LOOP UNTIL keypress$ = CHR$(27)
  53.  
  54. DATA "World War II I  INTRODUCTION World War II, global military conflict that, in terms of lives lost and material destruction, was the most devastating war in human history. It began in 1939 as a European conflict between Germany and an Anglo-French coalition but eventually widened to include most of the nations of the world. It ended in 1945, leaving a new world order dominated by the United States and the USSR.More than any previous war, World War II involved the commitment of nations' entire human and economic resources, the blurring of the distinction between combatant and noncombatant, and the expansion of the battlefield to include all of the enemy's territory. The most important determinants of its outcome were industrial capacity and personnel. In the last stages of the war, two radically new weapons were introduced: the long-range rocket and the atomic bomb. In the main, however, the war was fought with the same or improved weapons of the types used in World War I. The greatest advances were in aircraft and tanks.II  THE WORLD AFTER WORLD WAR I Three major powers had been dissatisfied with the outcome of World War I. Germany, the principal defeated nation, bitterly resented the territorial losses and reparations payments imposed on it by the Treaty of Versailles. Italy, one of the victors, found its territorial gains far from enough either to offset the cost of the war or to satisfy its ambitions. Japan, also a victor, was unhappy about its failure to gain control of China.A  Causes of the War France, the United Kingdom, and the U.S. had attained their wartime objectives. They had reduced Germany to a military cipher and had reorganized Europe and the world as they saw fit. The French and the British frequently disagreed on policy in the postwar period, however, and were unsure of their ability to defend the peace settlement. The U.S., disillusioned by the Europeans' failure to repay their war debts, retreated into isolationism.A1  The Failure of Peace Efforts During the 1920s, attempts were made to achieve a stable peace. The first was the establishment (1920) of the League of Nations as a forum in which nations could settle their disputes. The league's powers were limited to persuasion and various levels of moral and economic sanctions that the members were free to carry out as they saw fit. At the Washington Conference of 1921-22, the principal naval powers agreed to limit their navies according to a fixed ratio. The Locarno Conference (1925) produced a treaty guarantee of the German-French boundary and an arbitration agreement between Germany and Poland. In the Paris Peace Pact (1928), 63 countries, including all the great powers except the USSR, renounced war as an instrument of national policy and pledged to resolve all disputes among them “by pacific means.” The signatories had agreed beforehand to exempt wars of “self-defense.”A2  The Rise of FascismOne of the victors' stated aims in World War I had been “to make the world safe for democracy,” and postwar Germany adopted a democratic constitution, as did most of the other states restored or created after the war. In the 1920s, however, the wave of the future appeared to be a form of nationalistic, militaristic totalitarianism known by its Italian name, fascism. It promised to minister to peoples' wants more effectively than democracy and presented itself as the one sure defense against communism. Benito Mussolini established the first Fascist dictatorship in Italy in 1922.A3  Formation of the Axis Coalition Adolf Hitler, the Führer (“leader”) of the German National Socialist (Nazi) Party, preached a racist brand of fascism. Hitler promised to overturn the Versailles Treaty and secure additional Lebensraum (“living space”) for the German people, who he contended deserved more as members of a superior race. In the early 1930s, the depression hit Germany. The moderate parties could not agree on what to do about it, and large numbers of voters turned to the Nazis and Communists. In 1933 Hitler became the German chancellor, and in a series of subsequent moves established himself as dictator.Japan did not formally adopt fascism, but the armed forces' powerful position in the government enabled them to impose a similar type of totalitarianism. As dismantlers of the world status quo, the Japanese military were well ahead of Hitler. They used a minor clash with Chinese troops near Mukden in 1931 as a pretext for taking over all of Manchuria, where they proclaimed the puppet state of Manchukuo in 1932. In 1937-38 they occupied the main Chinese ports.Having denounced the disarmament clauses of the Versailles Treaty, created a new air force, and reintroduced conscription, Hitler tried out his new weapons on the side of right-wing military rebels in the Spanish Civil War (1936-39). The venture brought him into collaboration with Mussolini, who was also supporting the Spanish revolt after having seized (1935-36) Ethiopia in a small war. Treaties between Germany, Italy, and Japan in the period from 1936 to 1940 brought into being the Rome-Berlin-Tokyo Axis. The Axis thereafter became the collective term for those countries and their allies.A4  German Aggression in Europe Hitler launched his own expansionist drive with the annexation of Austria in March 1938. The way was clear: Mussolini supported him; and the British and French, overawed by German rearmament, accepted Hitler's claim that the status of Austria was an internal German affair. The U.S. had severely impaired its ability to act against aggression by passing a neutrality law that prohibited material assistance to all parties in foreign conflicts.In September 1938 Hitler threatened war to annex the western border area of Czechoslovakia, the Sudetenland and its 3.5 million ethnic Germans. The British prime minister Neville Chamberlain initiated talks that culminated at the end of the month in the Munich Pact, by which the Czechs, on British and French urging, relinquished the Sudetenland in return for Hitler's promise not to take any more Czech territory. Chamberlain believed he had achieved “peace for our time,” but the word Munich soon implied abject and futile appeasement.Less than six months later, in March 1939, Hitler seized the remainder of Czechoslovakia. Alarmed by this new aggression and by Hitler's threats against Poland, the British government pledged to aid that country if Germany threatened its independence. France already had a mutual defense treaty with Poland.The turn away from appeasement brought the Soviet Union to the fore. Joseph Stalin, the Soviet dictator, had offered military help to Czechoslovakia during the 1938 crisis, but had been ignored by all the parties to the Munich Pact. Now that war threatened, he was courted by both sides, but Hitler made the more attractive offer. Allied with Britain and France, the Soviet Union might well have had to fight, but all Germany asked for was its neutrality. In Moscow, on the night of August 23, 1939, the Nazi-Soviet Pact was signed. In the part published the next day, Germany and the Soviet Union agreed not to go to war against each other. A secret protocol gave Stalin a free hand in Finland, Estonia, Latvia, eastern Poland, and eastern Romania.III  MILITARY OPERATIONS In the early morning hours of September 1, 1939, the German armies marched into Poland. On September 3 the British and French surprised Hitler by declaring war on Germany, but they had no plans for rendering active assistance to the Poles.A  The First Phase: Dominance of the Axis Man for man, the German and Polish forces were an even match. Hitler committed about 1.5 million troops, and the Polish commander, Marshal Edward Smigly-Rydz, expected to muster 1.8 million. That was not the whole picture, however. The Germans had six panzer (armored) and four motorized divisions; the Poles had one armored and one motorized brigade and a few tank battalions. The Germans' 1600 aircraft were mostly of the latest types. Half of the Poles' 935 planes were obsolete.A1  The Blitzkrieg in Poland Polish strategic doctrine called for a rigid defense of the whole frontier and anticipated several weeks of preliminary skirmishing. It was wrong on both counts. On the morning of September 1, waves of German bombers hit the railroads and hopelessly snarled the Polish mobilization. In four more days, two army groups—one on the north out of East Prussia, the other on the south out of Silesia—had broken through on relatively narrow fronts and were sending armored spearheads on fast drives toward Warsaw and Brest. This was blitzkrieg (lightning war): the use of armor, air power, and mobile infantry in a pincers movement to encircle the enemy.Between September 8 and 10, the Germans closed in on Warsaw from the north and south, trapping the Polish forces west of the capital. On September 17, a second, deeper encirclement closed 160 km (100 mi) east, near Brest. On that day, too, the Soviet Red Army lunged across the border. By September 20, practically the whole country was in German or Soviet hands, and only isolated pockets continued to resist. The last to surrender was the fortress at Kock, on October 6.A2  The Phony War A French and British offensive in the west might have enabled Poland to fight longer, but until enough British arrived, it would have had to be mounted mainly by the French; French strategy, however, was defensive, based on holding the heavily fortified Maginot line. The quick finish in Poland left both sides at loose ends. Dismayed, the British and French became preoccupied with schemes to stave off a bloody replay of World War I. Hitler made a halfhearted peace offer and at the same time ordered his generals to ready an attack on the Low Countries and France. The generals, who did not think they could do against France what they had done in Poland, asked for time and insisted they could only take Holland, Belgium, and the French channel coast. Except at sea, where German submarines operated against merchant shipping and the British navy imposed a blockade, so little was going on after the first week in October that the U.S. newspapers called it the Phony War.A3  The Soviet-Finnish War On November 30, after two months of diplomatic wrangling, the Soviet Union declared war on Finland. Stalin was bent on having a blitzkrieg of his own, but his plan faltered. The Finns, under Marshal Carl G. Mannerheim, were expert at winter warfare. The Soviet troops, on the other hand, were often badly led, in part because political purges had claimed many of the Red Army's senior officers. Outnumbered by at least five to one, the Finns held their own and kept fighting into the new year.The attack on Finland aroused world opinion against the Soviet Union and gave an opening to the British and French. They had long had their eyes on a mine at Kiruna in northern Sweden that was Germany's main source of iron ore. In summer the ore went through the Baltic Sea, in winter to the ice-free Norwegian port of Narvik and then through neutral Norwegian waters to Germany. The Narvik-Kiruna railroad also connected on the east with the Finnish railroads; consequently, an Anglo-French force ostensibly sent to help the Finns would automatically be in position to occupy Narvik and Kiruna. The problem was to get Norway and Sweden to cooperate, which both refused to do.In Germany, the naval chief, Admiral Erich Raeder, urged Hitler to occupy Norway for the sake of its open-water ports on the Atlantic, but Hitler showed little interest until late January 1940, when the weather and the discovery of some invasion plans by Belgium forced him to delay the attack on the Low Countries and France indefinitely. The first studies he had made showed that Norway could best be taken by simultaneous landings at eight port cities from Narvik to Oslo. Because the troops would have to be transported on warships and because those would be easy prey for the British navy, the operation would have to be executed while the nights were long. Denmark, which posed no military problems, could be usefully included because it had airfields close to Norway. A4  Denmark and Norway Stalin, fearing outside intervention, ended his war on March 8 on terms that cost Finland territory but left it independent. The British and French then had to find another pretext for their projected action in Narvik and Kiruna; they decided to lay mines just outside the Narvik harbor. This they thought would provoke some kind of violent German reaction, which would let them spring to Norway's side—and into Narvik.Hitler approved the incursions into Norway and Denmark on April 2, and the warships sailed on April 7. A British task force laid the mines the next morning and headed home, passing the German ships without seeing them and leaving them to make the landings unopposed on the morning of April 9. Denmark surrendered at once, and the landings succeeded everywhere but at Oslo. There a fort blocked the approach from the sea, and fog prevented an airborne landing. The Germans occupied Oslo by noon, but in the meantime, the Norwegian government, deciding to fight, had moved to Elverum. Although the Norwegians, aided by 12,000 British and French, held out in the area between Oslo and Trondheim until May 3, the conclusion was never in doubt. Narvik was different. There 4600 Germans faced 24,600 British, French, and Norwegians backed by the guns of the British navy. The Germans had an advantage in the ruggedness of the terrain and a greater one in their opponents' slow, methodical moves. Thus, they held Narvik until May 28. In the first week of June they were backed against the Swedish border and close to having to choose surrender or internment, but by then, military disasters in France were forcing the British and French to recall their troops from Narvik.  A5  The Low Countries  By spring, Hitler had found a new and better way of handling the campaign against France and the Low Countries. The first plan had been to have the main force go through Belgium, as it had in World War I. General Erich von Manstein and some other advisers, however, had persuaded Hitler to shift the main force south to the area of Luxembourg and the Ardennes Forest. The Ardennes was hilly, wooded, and not the best country for tanks, but Manstein argued that the enemy would not expect a big attack there. The tanks could make a fast northwestward sweep from the Ardennes, behind the Belgians and British and part of the French. After reaching the coast and defeating the enemy in Belgium, they could make an about-face and strike to the southeast behind the French armies along the Maginot line. When the attack began, on May 10, 1940, the two sides were approximately equal in numbers of troops and tanks; the Germans were superior in aircraft. The decisive advantage of the Germans, however, was that they knew exactly what they were going to do. Their opponents had to improvise, in part because the Belgians and Dutch tried to stay neutral to the last. The British and French, moreover, had failed to learn from the example of Poland, having attributed that country's defeat to its inherent weakness. Consequently, they were not prepared to deal with the German armor. Their tanks were scattered among the infantry; those of the Germans were drawn together in a panzer group, an armored army. On May 10 German airborne troops landed inside Belgium and Holland to seize airfields and bridges and, most notably, the great Belgian fortress Eben-Emael. The Dutch army surrendered on May 14, several hours after bombers had destroyed the business section of Rotterdam. Also on May 14 the German main force, the panzer group in the lead, came out of the Ardennes to begin the drive to the sea behind the British and French armies supporting the Belgians. A6  The Defeat of France  On May 20 the panzer group took Abbeville at the mouth of the Somme River and began to push north along the coast; it covered 400 km (250 mi) in 11 days. By May 26, the British and French were pushed into a narrow beachhead around Dunkerque. The Belgian king, Leopold III, surrendered his army the next day. Destroyers and smaller craft of all kinds rescued 338,226 men from Dunkerque in a heroic sealift that probably would not have succeeded if the German commander, General Gerd von Rundstedt, had not stopped the tanks to save them for the next phase. On June 5 the Germans launched a new assault against France. Italy declared war on France and Britain on June 10. The Maginot line, which only extended to the Belgian border, was intact, but the French commander, General Maxime Weygand, had nothing with which to screen it or Paris on the north and west. On June 17, Marshal Henri Philippe Pétain, a World War I hero who had become premier the day before, asked for an armistice. The armistice was signed on June 25 on terms that gave Germany control of northern France and the Atlantic coast. Pétain then set up a capital at Vichy in the unoccupied southeast. A7  The Battle of Britain  In the summer of 1940, Hitler dominated Europe from the North Cape to the Pyrenees. His one remaining active enemy—Britain, under a new prime minister, Winston Churchill—vowed to continue fighting. Whether it could was questionable. The British army had left most of its weapons on the beaches at Dunkerque. Stalin was in no mood to challenge Hitler. The U.S., shocked by the fall of France, began the first peacetime conscription in its history and greatly increased its military budget, but public opinion, although sympathetic to Britain, was against getting into the war. The Germans hoped to subdue the British by starving them out. In June 1940 they undertook the Battle of the Atlantic, using submarine warfare to cut the British overseas lifelines. The Germans now had submarine bases in Norway and France. At the outset the Germans had only 28 submarines, but more were being built—enough to keep Britain in danger until the spring of 1943 and to carry on the battle for months thereafter. Invasion was the expeditious way to finish off Britain, but that meant crossing the English Channel; Hitler would not risk it unless the British air force could be neutralized first. As a result, the Battle of Britain was fought in the air, not on the beaches. In August 1940 the Germans launched daylight raids against ports and airfields and in September against inland cities. The objective was to draw out the British fighters and destroy them. The Germans failed to reckon with a new device, radar, which greatly increased the British fighters' effectiveness. Because their own losses were too high, the Germans had to switch to night bombing at the end of September. Between then and May 1941 they made 71 major raids on London and 56 on other cities, but the damage they wrought was too indiscriminate to be militarily decisive. On September 17, 1940, Hitler postponed the invasion indefinitely, thereby conceding defeat in the Battle of Britain. A8  The Balkans and North Africa (1940-1941)  In fact, Hitler had told his generals in late July 1940 that the next attack would be on the USSR. There, he said, Germany would get its “living space” and defeat Britain as well. He claimed the British were only being kept in the war by the hope of a falling-out between Germany and the USSR. When the Soviets had been defeated and British positions in India and the Middle East were threatened, he believed that Britain would make peace. Hitler wanted to start in the fall of 1940, but his advisers persuaded him to avoid the risks of a winter campaign in the Soviet Union and wait until the spring.Meanwhile, Germany's ally, Mussolini, had staged an unsuccessful attack (September 1940) on British-occupied Egypt from the Italian colony of Libya and an equally abortive invasion (October 1940) of Greece. In response to the latter move, the British occupied airfields on Crete (Kríti) and in Greece. Hitler did not want British planes within striking distance of his one major oil source, the Ploiesti fields in Romania, and in November he began to prepare an operation against Greece.Early in 1941 British forces pushed the Italians back into Libya, and in February Hitler sent General Erwin Rommel with a two-division tank corps, the Afrika Korps, to help his allies.Because he would need to cross their territory to get at Greece (and the Soviet Union), Hitler brought Romania and Hungary into the Axis alliance in November 1940; Bulgaria joined in March 1941. When Yugoslavia refused to follow suit, Hitler ordered an invasion of that country.A8a  Yugoslavia The operations against Greece and Yugoslavia began on April 6, 1941. The Germans' primary difficulty with the attack on Yugoslavia was in pulling together an army of nine divisions from Germany and France in less than ten days. They had to limit themselves for several days to air raids and border skirmishing. On April 10 they opened drives on Belgrade from the northwest, north, and southeast. The city fell on April 13, and the Yugoslav army surrendered the next day. Yugoslavia, however, was easier to take than it would be to hold. Guerrillas—Cetniks under Draža Mihajlovic and partisans under Josip Broz (Tito)—fought throughout the war.A8b  Greece The Greek army of 430,000, unlike the Yugoslav, was fully mobilized, and to some extent battle tested, but national pride compelled it to try to defend the Metaxas line northeast of Salonika. By one short thrust to Salonika, the Germans forced the surrender on April 9 of the line and about half of the Greek army. After the Greek First Army, pulling out of Albania, was trapped at the Metsóvon Pass and surrendered on April 22, the British force of some 62,000 troops retreated southward. Thereafter, fast German drives—to the Isthmus of Corinth by April 27 and through the Pelopónnisos by April 30—forced the British into an evacuation that cost them 12,000 men. An airborne assault on May 20-27 also brought Crete into German hands.Meanwhile, Rommel had launched a successfulounteroffensive against the British in Libya, expelling them from the country (except for an isolated garrison at Tobruk) by April 1941.B  The Second Phase: Expansion of the War In the year after the fall of France, the war moved toward a new stage—world war. While conducting subsidiary campaigns in the Balkans, in North Africa, and in the air against Britain, Hitler deployed his main forces to the east and brought the countries of southeastern Europe (as well as Finland) into a partnership against the USSR.B1  U.S. Aid to Britain The U.S. abandoned strict neutrality in the European war and approached a confrontation with Japan in Asia and the Pacific Ocean. U.S. and British conferences, begun in January 1941, determined a basic strategy for the event of a U.S. entry into the war, namely, that both would center their effort on Germany, leaving Japan, if need be, to be dealt with later.In March 1941 the U.S. Congress passed the Lend-Lease Act and appropriated an initial $7 billion to lend or lease weapons and other aid to any countries the president might designate. By this means the U.S. hoped to ensure victory over the Axis without involving its own troops. By late summer of 1941, however, the U.S. was in a state of undeclared war with Germany. In July, U.S. Marines were stationed in Iceland, which had been occupied by the British in May 1940, and thereafter the U.S. Navy took over the task of escorting convoys in the waters west of Iceland. In September President Franklin D. Roosevelt authorized ships on convoy duty to attack Axis war vessels.B2  Friction Between the U.S. and Japan Meanwhile, American relations with Japan continued to deteriorate. In September 1940 Japan coerced Vichy France into giving up northern Indochina. The U.S. retaliated by prohibiting the exportation of steel, scrap iron, and aviation gasoline to Japan. In April 1941, the Japanese signed a neutrality treaty with the USSR as insurance against an attack from that direction if they were to come into conflict with Britain or the U.S. while taking a bigger bite out of Southeast Asia. When Germany invaded the USSR in June, Japanese leaders considered breaking the treaty and joining in from the east, but, making one of the most fateful decisions of the war, they chose instead to intensify their push to the southeast. On July 23 Japan occupied southern Indochina. Two days later, the United States, Britain, and the Netherlands froze Japanese assets. The effect was to prevent Japan from purchasing oil, which would, in time, cripple its army and make its navy and air force completely useless.B3  The German Invasion of the USSR The war's most massive encounter began on the morning of June 22, 1941, when slightly more than 3 million German troops invaded the USSR. Although German preparations had been visible for months and had been talked about openly among the diplomats in Moscow, the Soviet forces were taken by surprise. Stalin, his confidence in the country's military capability shaken by the Finnish war, had refused to allow any counteractivity for fear of provoking the Germans. Moreover, the Soviet military leadership had concluded that blitzkrieg, as it had been practiced in Poland and France, would not be possible on the scale of a Soviet-German war; both sides would therefore confine themselves for the first several weeks at least to sparring along the frontier. The Soviet army had 2.9 million troops on the western border and outnumbered the Germans by two to one in tanks and by two or three to one in aircraft. Many of its tanks and aircraft were older types, but some of the tanks, particularly the later famous T-34s, were far superior to any the Germans had. Large numbers of the aircraft were destroyed on the ground in the first day, however, and their tanks, like those of the French, were scattered among the infantry, where they could not be effective against the German panzer groups. The infantry was first ordered to counterattack, which was impossible, and then forbidden to retreat, which ensured their wholesale destruction or capture."
  55.  

« Last Edit: January 25, 2021, 01:35:26 pm by bartok »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #22 on: January 25, 2021, 01:39:56 pm »
Cool, you're from Italy! You are the third member here I've met from my grandparents home country. Sorry, but I don't speak Italian. I do speak English, but to the level that most people believe it is my second language. Tempo is from Italy, btw, and if you need help getting anything across, I'm sure he'd give you a hand.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #23 on: January 26, 2021, 02:34:18 pm »
@bartok

Man I never worked with VIEW PRINT before here is my test of it with your SCROLL TEST code modified to show how VIEW PRINT is intended to work IMHO,

Unexpected! For VIEW PRINT m to n
It uses m for first line of scrolling text
It uses n for always leaving blank!!! for scrolling so text scrolls up when it hits that row

My Test use 10 rows of text and calls VIEW PRINT 5 to 15  that's 11 lines minus the one kept blank for scrolling.

CLS does NOT work inside VIEW PRINT, it clears everything!!! So to clear last screen inside VIEW PRINT you have to print 10 blank lines or however many rows of text you are using.

Code: QB64: [Select]
  1.  
  2.  
  3. 'PAG UP: first page
  4. 'PAG DOWN: last page
  5. 'ARROW KEY UP: page up
  6. 'ARROW KEY DOWN: page down
  7.  
  8.  
  9. _TITLE "VIEW PRINT test with bartok's SCROLL TEST, pg up for Text Start, pg dn for Text end, up arrow = page up, down arrow = page down"
  10.  
  11. CONST green = _RGB32(0, 127, 0)
  12. CONST L% = 1024
  13. CONST H% = 160 '>>> make only 10 rows in view print
  14. CONST rows% = H% \ 16 '=48 >>> 10 rows
  15. CONST columns% = L% \ 8 '=128
  16.  
  17. DIM i%, n%
  18. DIM text$, keypress$
  19. DIM monitor&
  20.  
  21. REDIM visibleText$(1)
  22.  
  23. textLEN% = (rows%) * columns% '=(47*128)=6016  '>>>>>>>>>>>>> not (rows-1)
  24.  
  25. monitor& = _NEWIMAGE(L%, 640, 32) 'lets use View print the way it is intended in a section of the screen say line 5 to 15
  26. '_FULLSCREEN '<<<<<<<<<<<< this is terrible for debugging!!!!
  27. SCREEN monitor&
  28. _DELAY .25 '         >>>>>>>>>> load screen wait
  29. _SCREENMOVE _MIDDLE '>>>>>>>>>>>>>>> now center it
  30. _DEST monitor&
  31. READ text$
  32. i% = 1
  33. n% = 0
  34. DO ' create the array that divides the text into "i" texts with LEN corresponding to the visible text on the monitor.
  35.     REDIM _PRESERVE visibleText$(i%)
  36.     visibleText$(i%) = MID$(text$, n% * textLEN% + 1, textLEN%)
  37.     n% = n% + 1
  38.     i% = i% + 1
  39. LOOP UNTIL LEN(visibleText$(i% - 1)) < textLEN%
  40. i% = 1
  41. FOR i = 1 TO 38
  42.     PRINT i
  43. LOCATE 4, 1: PRINT "Line 4, next line is for VIEW PRINT -----------------------------------------------------------------------------"
  44. LOCATE 5 + rows% + 1, 1: PRINT "Line 16, above 10 lines are for VIEW PRINT ----------------------------------------------------------"
  45. VIEW PRINT 5 TO 5 + rows% '<<<<<<<<<<<< dont do this inside the main loop over and over again
  46. COLOR green
  47. DO ' it displays the visible texts.
  48.     '''' VIEW PRINT 1 TO rows% '<<<<<<<<<<<< dont do this inside the main loop over and over again
  49.  
  50.  
  51.  
  52.     'CLS  ' nope this clears every thing  on the screen!!!!!!!!!!!!!!!!!
  53.     FOR j = 1 TO rows%
  54.         PRINT SPACE$(columns%) ' CLS sub for VIEW PRINT???
  55.     NEXT
  56.  
  57.     PRINT visibleText$(i%)
  58.     'SLEEP
  59.     DO
  60.         keypress$ = INKEY$
  61.     LOOP UNTIL keypress$ <> ""
  62.     SELECT CASE keypress$
  63.         CASE CHR$(0) + "H"
  64.             IF i% > 1 THEN i% = i% - 1
  65.         CASE CHR$(0) + "P"
  66.             IF i% < UBOUND(visibleText$) THEN i% = i% + 1
  67.         CASE CHR$(0) + "I"
  68.             i% = 1
  69.         CASE CHR$(0) + "Q"
  70.             i% = UBOUND(visibleText$)
  71.     END SELECT
  72. LOOP UNTIL keypress$ = CHR$(27)
  73.  
  74. DATA "World War II I  INTRODUCTION World War II, global military conflict that, in terms of lives lost and material destruction, was the most devastating war in human history. It began in 1939 as a European conflict between Germany and an Anglo-French coalition but eventually widened to include most of the nations of the world. It ended in 1945, leaving a new world order dominated by the United States and the USSR.More than any previous war, World War II involved the commitment of nations' entire human and economic resources, the blurring of the distinction between combatant and noncombatant, and the expansion of the battlefield to include all of the enemy's territory. The most important determinants of its outcome were industrial capacity and personnel. In the last stages of the war, two radically new weapons were introduced: the long-range rocket and the atomic bomb. In the main, however, the war was fought with the same or improved weapons of the types used in World War I. The greatest advances were in aircraft and tanks.II  THE WORLD AFTER WORLD WAR I Three major powers had been dissatisfied with the outcome of World War I. Germany, the principal defeated nation, bitterly resented the territorial losses and reparations payments imposed on it by the Treaty of Versailles. Italy, one of the victors, found its territorial gains far from enough either to offset the cost of the war or to satisfy its ambitions. Japan, also a victor, was unhappy about its failure to gain control of China.A  Causes of the War France, the United Kingdom, and the U.S. had attained their wartime objectives. They had reduced Germany to a military cipher and had reorganized Europe and the world as they saw fit. The French and the British frequently disagreed on policy in the postwar period, however, and were unsure of their ability to defend the peace settlement. The U.S., disillusioned by the Europeans' failure to repay their war debts, retreated into isolationism.A1  The Failure of Peace Efforts During the 1920s, attempts were made to achieve a stable peace. The first was the establishment (1920) of the League of Nations as a forum in which nations could settle their disputes. The league's powers were limited to persuasion and various levels of moral and economic sanctions that the members were free to carry out as they saw fit. At the Washington Conference of 1921-22, the principal naval powers agreed to limit their navies according to a fixed ratio. The Locarno Conference (1925) produced a treaty guarantee of the German-French boundary and an arbitration agreement between Germany and Poland. In the Paris Peace Pact (1928), 63 countries, including all the great powers except the USSR, renounced war as an instrument of national policy and pledged to resolve all disputes among them “by pacific means.” The signatories had agreed beforehand to exempt wars of “self-defense.”A2  The Rise of FascismOne of the victors' stated aims in World War I had been “to make the world safe for democracy,” and postwar Germany adopted a democratic constitution, as did most of the other states restored or created after the war. In the 1920s, however, the wave of the future appeared to be a form of nationalistic, militaristic totalitarianism known by its Italian name, fascism. It promised to minister to peoples' wants more effectively than democracy and presented itself as the one sure defense against communism. Benito Mussolini established the first Fascist dictatorship in Italy in 1922.A3  Formation of the Axis Coalition Adolf Hitler, the Führer (“leader”) of the German National Socialist (Nazi) Party, preached a racist brand of fascism. Hitler promised to overturn the Versailles Treaty and secure additional Lebensraum (“living space”) for the German people, who he contended deserved more as members of a superior race. In the early 1930s, the depression hit Germany. The moderate parties could not agree on what to do about it, and large numbers of voters turned to the Nazis and Communists. In 1933 Hitler became the German chancellor, and in a series of subsequent moves established himself as dictator.Japan did not formally adopt fascism, but the armed forces' powerful position in the government enabled them to impose a similar type of totalitarianism. As dismantlers of the world status quo, the Japanese military were well ahead of Hitler. They used a minor clash with Chinese troops near Mukden in 1931 as a pretext for taking over all of Manchuria, where they proclaimed the puppet state of Manchukuo in 1932. In 1937-38 they occupied the main Chinese ports.Having denounced the disarmament clauses of the Versailles Treaty, created a new air force, and reintroduced conscription, Hitler tried out his new weapons on the side of right-wing military rebels in the Spanish Civil War (1936-39). The venture brought him into collaboration with Mussolini, who was also supporting the Spanish revolt after having seized (1935-36) Ethiopia in a small war. Treaties between Germany, Italy, and Japan in the period from 1936 to 1940 brought into being the Rome-Berlin-Tokyo Axis. The Axis thereafter became the collective term for those countries and their allies.A4  German Aggression in Europe Hitler launched his own expansionist drive with the annexation of Austria in March 1938. The way was clear: Mussolini supported him; and the British and French, overawed by German rearmament, accepted Hitler's claim that the status of Austria was an internal German affair. The U.S. had severely impaired its ability to act against aggression by passing a neutrality law that prohibited material assistance to all parties in foreign conflicts.In September 1938 Hitler threatened war to annex the western border area of Czechoslovakia, the Sudetenland and its 3.5 million ethnic Germans. The British prime minister Neville Chamberlain initiated talks that culminated at the end of the month in the Munich Pact, by which the Czechs, on British and French urging, relinquished the Sudetenland in return for Hitler's promise not to take any more Czech territory. Chamberlain believed he had achieved “peace for our time,” but the word Munich soon implied abject and futile appeasement.Less than six months later, in March 1939, Hitler seized the remainder of Czechoslovakia. Alarmed by this new aggression and by Hitler's threats against Poland, the British government pledged to aid that country if Germany threatened its independence. France already had a mutual defense treaty with Poland.The turn away from appeasement brought the Soviet Union to the fore. Joseph Stalin, the Soviet dictator, had offered military help to Czechoslovakia during the 1938 crisis, but had been ignored by all the parties to the Munich Pact. Now that war threatened, he was courted by both sides, but Hitler made the more attractive offer. Allied with Britain and France, the Soviet Union might well have had to fight, but all Germany asked for was its neutrality. In Moscow, on the night of August 23, 1939, the Nazi-Soviet Pact was signed. In the part published the next day, Germany and the Soviet Union agreed not to go to war against each other. A secret protocol gave Stalin a free hand in Finland, Estonia, Latvia, eastern Poland, and eastern Romania.III  MILITARY OPERATIONS In the early morning hours of September 1, 1939, the German armies marched into Poland. On September 3 the British and French surprised Hitler by declaring war on Germany, but they had no plans for rendering active assistance to the Poles.A  The First Phase: Dominance of the Axis Man for man, the German and Polish forces were an even match. Hitler committed about 1.5 million troops, and the Polish commander, Marshal Edward Smigly-Rydz, expected to muster 1.8 million. That was not the whole picture, however. The Germans had six panzer (armored) and four motorized divisions; the Poles had one armored and one motorized brigade and a few tank battalions. The Germans' 1600 aircraft were mostly of the latest types. Half of the Poles' 935 planes were obsolete.A1  The Blitzkrieg in Poland Polish strategic doctrine called for a rigid defense of the whole frontier and anticipated several weeks of preliminary skirmishing. It was wrong on both counts. On the morning of September 1, waves of German bombers hit the railroads and hopelessly snarled the Polish mobilization. In four more days, two army groups—one on the north out of East Prussia, the other on the south out of Silesia—had broken through on relatively narrow fronts and were sending armored spearheads on fast drives toward Warsaw and Brest. This was blitzkrieg (lightning war): the use of armor, air power, and mobile infantry in a pincers movement to encircle the enemy.Between September 8 and 10, the Germans closed in on Warsaw from the north and south, trapping the Polish forces west of the capital. On September 17, a second, deeper encirclement closed 160 km (100 mi) east, near Brest. On that day, too, the Soviet Red Army lunged across the border. By September 20, practically the whole country was in German or Soviet hands, and only isolated pockets continued to resist. The last to surrender was the fortress at Kock, on October 6.A2  The Phony War A French and British offensive in the west might have enabled Poland to fight longer, but until enough British arrived, it would have had to be mounted mainly by the French; French strategy, however, was defensive, based on holding the heavily fortified Maginot line. The quick finish in Poland left both sides at loose ends. Dismayed, the British and French became preoccupied with schemes to stave off a bloody replay of World War I. Hitler made a halfhearted peace offer and at the same time ordered his generals to ready an attack on the Low Countries and France. The generals, who did not think they could do against France what they had done in Poland, asked for time and insisted they could only take Holland, Belgium, and the French channel coast. Except at sea, where German submarines operated against merchant shipping and the British navy imposed a blockade, so little was going on after the first week in October that the U.S. newspapers called it the Phony War.A3  The Soviet-Finnish War On November 30, after two months of diplomatic wrangling, the Soviet Union declared war on Finland. Stalin was bent on having a blitzkrieg of his own, but his plan faltered. The Finns, under Marshal Carl G. Mannerheim, were expert at winter warfare. The Soviet troops, on the other hand, were often badly led, in part because political purges had claimed many of the Red Army's senior officers. Outnumbered by at least five to one, the Finns held their own and kept fighting into the new year.The attack on Finland aroused world opinion against the Soviet Union and gave an opening to the British and French. They had long had their eyes on a mine at Kiruna in northern Sweden that was Germany's main source of iron ore. In summer the ore went through the Baltic Sea, in winter to the ice-free Norwegian port of Narvik and then through neutral Norwegian waters to Germany. The Narvik-Kiruna railroad also connected on the east with the Finnish railroads; consequently, an Anglo-French force ostensibly sent to help the Finns would automatically be in position to occupy Narvik and Kiruna. The problem was to get Norway and Sweden to cooperate, which both refused to do.In Germany, the naval chief, Admiral Erich Raeder, urged Hitler to occupy Norway for the sake of its open-water ports on the Atlantic, but Hitler showed little interest until late January 1940, when the weather and the discovery of some invasion plans by Belgium forced him to delay the attack on the Low Countries and France indefinitely. The first studies he had made showed that Norway could best be taken by simultaneous landings at eight port cities from Narvik to Oslo. Because the troops would have to be transported on warships and because those would be easy prey for the British navy, the operation would have to be executed while the nights were long. Denmark, which posed no military problems, could be usefully included because it had airfields close to Norway. A4  Denmark and Norway Stalin, fearing outside intervention, ended his war on March 8 on terms that cost Finland territory but left it independent. The British and French then had to find another pretext for their projected action in Narvik and Kiruna; they decided to lay mines just outside the Narvik harbor. This they thought would provoke some kind of violent German reaction, which would let them spring to Norway's side—and into Narvik.Hitler approved the incursions into Norway and Denmark on April 2, and the warships sailed on April 7. A British task force laid the mines the next morning and headed home, passing the German ships without seeing them and leaving them to make the landings unopposed on the morning of April 9. Denmark surrendered at once, and the landings succeeded everywhere but at Oslo. There a fort blocked the approach from the sea, and fog prevented an airborne landing. The Germans occupied Oslo by noon, but in the meantime, the Norwegian government, deciding to fight, had moved to Elverum. Although the Norwegians, aided by 12,000 British and French, held out in the area between Oslo and Trondheim until May 3, the conclusion was never in doubt. Narvik was different. There 4600 Germans faced 24,600 British, French, and Norwegians backed by the guns of the British navy. The Germans had an advantage in the ruggedness of the terrain and a greater one in their opponents' slow, methodical moves. Thus, they held Narvik until May 28. In the first week of June they were backed against the Swedish border and close to having to choose surrender or internment, but by then, military disasters in France were forcing the British and French to recall their troops from Narvik.  A5  The Low Countries  By spring, Hitler had found a new and better way of handling the campaign against France and the Low Countries. The first plan had been to have the main force go through Belgium, as it had in World War I. General Erich von Manstein and some other advisers, however, had persuaded Hitler to shift the main force south to the area of Luxembourg and the Ardennes Forest. The Ardennes was hilly, wooded, and not the best country for tanks, but Manstein argued that the enemy would not expect a big attack there. The tanks could make a fast northwestward sweep from the Ardennes, behind the Belgians and British and part of the French. After reaching the coast and defeating the enemy in Belgium, they could make an about-face and strike to the southeast behind the French armies along the Maginot line. When the attack began, on May 10, 1940, the two sides were approximately equal in numbers of troops and tanks; the Germans were superior in aircraft. The decisive advantage of the Germans, however, was that they knew exactly what they were going to do. Their opponents had to improvise, in part because the Belgians and Dutch tried to stay neutral to the last. The British and French, moreover, had failed to learn from the example of Poland, having attributed that country's defeat to its inherent weakness. Consequently, they were not prepared to deal with the German armor. Their tanks were scattered among the infantry; those of the Germans were drawn together in a panzer group, an armored army. On May 10 German airborne troops landed inside Belgium and Holland to seize airfields and bridges and, most notably, the great Belgian fortress Eben-Emael. The Dutch army surrendered on May 14, several hours after bombers had destroyed the business section of Rotterdam. Also on May 14 the German main force, the panzer group in the lead, came out of the Ardennes to begin the drive to the sea behind the British and French armies supporting the Belgians. A6  The Defeat of France  On May 20 the panzer group took Abbeville at the mouth of the Somme River and began to push north along the coast; it covered 400 km (250 mi) in 11 days. By May 26, the British and French were pushed into a narrow beachhead around Dunkerque. The Belgian king, Leopold III, surrendered his army the next day. Destroyers and smaller craft of all kinds rescued 338,226 men from Dunkerque in a heroic sealift that probably would not have succeeded if the German commander, General Gerd von Rundstedt, had not stopped the tanks to save them for the next phase. On June 5 the Germans launched a new assault against France. Italy declared war on France and Britain on June 10. The Maginot line, which only extended to the Belgian border, was intact, but the French commander, General Maxime Weygand, had nothing with which to screen it or Paris on the north and west. On June 17, Marshal Henri Philippe Pétain, a World War I hero who had become premier the day before, asked for an armistice. The armistice was signed on June 25 on terms that gave Germany control of northern France and the Atlantic coast. Pétain then set up a capital at Vichy in the unoccupied southeast. A7  The Battle of Britain  In the summer of 1940, Hitler dominated Europe from the North Cape to the Pyrenees. His one remaining active enemy—Britain, under a new prime minister, Winston Churchill—vowed to continue fighting. Whether it could was questionable. The British army had left most of its weapons on the beaches at Dunkerque. Stalin was in no mood to challenge Hitler. The U.S., shocked by the fall of France, began the first peacetime conscription in its history and greatly increased its military budget, but public opinion, although sympathetic to Britain, was against getting into the war. The Germans hoped to subdue the British by starving them out. In June 1940 they undertook the Battle of the Atlantic, using submarine warfare to cut the British overseas lifelines. The Germans now had submarine bases in Norway and France. At the outset the Germans had only 28 submarines, but more were being built—enough to keep Britain in danger until the spring of 1943 and to carry on the battle for months thereafter. Invasion was the expeditious way to finish off Britain, but that meant crossing the English Channel; Hitler would not risk it unless the British air force could be neutralized first. As a result, the Battle of Britain was fought in the air, not on the beaches. In August 1940 the Germans launched daylight raids against ports and airfields and in September against inland cities. The objective was to draw out the British fighters and destroy them. The Germans failed to reckon with a new device, radar, which greatly increased the British fighters' effectiveness. Because their own losses were too high, the Germans had to switch to night bombing at the end of September. Between then and May 1941 they made 71 major raids on London and 56 on other cities, but the damage they wrought was too indiscriminate to be militarily decisive. On September 17, 1940, Hitler postponed the invasion indefinitely, thereby conceding defeat in the Battle of Britain. A8  The Balkans and North Africa (1940-1941)  In fact, Hitler had told his generals in late July 1940 that the next attack would be on the USSR. There, he said, Germany would get its “living space” and defeat Britain as well. He claimed the British were only being kept in the war by the hope of a falling-out between Germany and the USSR. When the Soviets had been defeated and British positions in India and the Middle East were threatened, he believed that Britain would make peace. Hitler wanted to start in the fall of 1940, but his advisers persuaded him to avoid the risks of a winter campaign in the Soviet Union and wait until the spring.Meanwhile, Germany's ally, Mussolini, had staged an unsuccessful attack (September 1940) on British-occupied Egypt from the Italian colony of Libya and an equally abortive invasion (October 1940) of Greece. In response to the latter move, the British occupied airfields on Crete (Kríti) and in Greece. Hitler did not want British planes within striking distance of his one major oil source, the Ploiesti fields in Romania, and in November he began to prepare an operation against Greece.Early in 1941 British forces pushed the Italians back into Libya, and in February Hitler sent General Erwin Rommel with a two-division tank corps, the Afrika Korps, to help his allies.Because he would need to cross their territory to get at Greece (and the Soviet Union), Hitler brought Romania and Hungary into the Axis alliance in November 1940; Bulgaria joined in March 1941. When Yugoslavia refused to follow suit, Hitler ordered an invasion of that country.A8a  Yugoslavia The operations against Greece and Yugoslavia began on April 6, 1941. The Germans' primary difficulty with the attack on Yugoslavia was in pulling together an army of nine divisions from Germany and France in less than ten days. They had to limit themselves for several days to air raids and border skirmishing. On April 10 they opened drives on Belgrade from the northwest, north, and southeast. The city fell on April 13, and the Yugoslav army surrendered the next day. Yugoslavia, however, was easier to take than it would be to hold. Guerrillas—Cetniks under Draža Mihajlovic and partisans under Josip Broz (Tito)—fought throughout the war.A8b  Greece The Greek army of 430,000, unlike the Yugoslav, was fully mobilized, and to some extent battle tested, but national pride compelled it to try to defend the Metaxas line northeast of Salonika. By one short thrust to Salonika, the Germans forced the surrender on April 9 of the line and about half of the Greek army. After the Greek First Army, pulling out of Albania, was trapped at the Metsóvon Pass and surrendered on April 22, the British force of some 62,000 troops retreated southward. Thereafter, fast German drives—to the Isthmus of Corinth by April 27 and through the Pelopónnisos by April 30—forced the British into an evacuation that cost them 12,000 men. An airborne assault on May 20-27 also brought Crete into German hands.Meanwhile, Rommel had launched a successfulounteroffensive against the British in Libya, expelling them from the country (except for an isolated garrison at Tobruk) by April 1941.B  The Second Phase: Expansion of the War In the year after the fall of France, the war moved toward a new stage—world war. While conducting subsidiary campaigns in the Balkans, in North Africa, and in the air against Britain, Hitler deployed his main forces to the east and brought the countries of southeastern Europe (as well as Finland) into a partnership against the USSR.B1  U.S. Aid to Britain The U.S. abandoned strict neutrality in the European war and approached a confrontation with Japan in Asia and the Pacific Ocean. U.S. and British conferences, begun in January 1941, determined a basic strategy for the event of a U.S. entry into the war, namely, that both would center their effort on Germany, leaving Japan, if need be, to be dealt with later.In March 1941 the U.S. Congress passed the Lend-Lease Act and appropriated an initial $7 billion to lend or lease weapons and other aid to any countries the president might designate. By this means the U.S. hoped to ensure victory over the Axis without involving its own troops. By late summer of 1941, however, the U.S. was in a state of undeclared war with Germany. In July, U.S. Marines were stationed in Iceland, which had been occupied by the British in May 1940, and thereafter the U.S. Navy took over the task of escorting convoys in the waters west of Iceland. In September President Franklin D. Roosevelt authorized ships on convoy duty to attack Axis war vessels.B2  Friction Between the U.S. and Japan Meanwhile, American relations with Japan continued to deteriorate. In September 1940 Japan coerced Vichy France into giving up northern Indochina. The U.S. retaliated by prohibiting the exportation of steel, scrap iron, and aviation gasoline to Japan. In April 1941, the Japanese signed a neutrality treaty with the USSR as insurance against an attack from that direction if they were to come into conflict with Britain or the U.S. while taking a bigger bite out of Southeast Asia. When Germany invaded the USSR in June, Japanese leaders considered breaking the treaty and joining in from the east, but, making one of the most fateful decisions of the war, they chose instead to intensify their push to the southeast. On July 23 Japan occupied southern Indochina. Two days later, the United States, Britain, and the Netherlands froze Japanese assets. The effect was to prevent Japan from purchasing oil, which would, in time, cripple its army and make its navy and air force completely useless.B3  The German Invasion of the USSR The war's most massive encounter began on the morning of June 22, 1941, when slightly more than 3 million German troops invaded the USSR. Although German preparations had been visible for months and had been talked about openly among the diplomats in Moscow, the Soviet forces were taken by surprise. Stalin, his confidence in the country's military capability shaken by the Finnish war, had refused to allow any counteractivity for fear of provoking the Germans. Moreover, the Soviet military leadership had concluded that blitzkrieg, as it had been practiced in Poland and France, would not be possible on the scale of a Soviet-German war; both sides would therefore confine themselves for the first several weeks at least to sparring along the frontier. The Soviet army had 2.9 million troops on the western border and outnumbered the Germans by two to one in tanks and by two or three to one in aircraft. Many of its tanks and aircraft were older types, but some of the tanks, particularly the later famous T-34s, were far superior to any the Germans had. Large numbers of the aircraft were destroyed on the ground in the first day, however, and their tanks, like those of the French, were scattered among the infantry, where they could not be effective against the German panzer groups. The infantry was first ordered to counterattack, which was impossible, and then forbidden to retreat, which ensured their wholesale destruction or capture."
  75.  
  76.  
  77.  

Text Start:
  [ You are not allowed to view this attachment ]  

Text End looks like this because 10 blank lines are printed and then the incomplete last set of text, so bunch of blank lines left above text:
  [ You are not allowed to view this attachment ]  

Update: In Screen shots, the line label below the VIEW PRINT area should read "Line 16, above 11 lines.... "
« Last Edit: January 26, 2021, 03:06:24 pm by bplus »

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: graphs with QB64 and how to scroll the screen.
« Reply #24 on: January 26, 2021, 02:36:22 pm »
Don’t you CLS 1 or CLS 2, or such to only clear the view screen?  I seem to remember that from back in the day, though it’s been ages since I last used it.

https://www.qb64.org/wiki/index.php/CLS
« Last Edit: January 26, 2021, 02:37:59 pm by SMcNeill »
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #25 on: January 26, 2021, 02:48:13 pm »
CLS clears the whole screen, while CLS 2 only the active viewport such as when using VIEWPRINT 3 to 20 on a default SCREEN 0 80 x 25 screen display. CLS 2 won't clear the last line, but notice in the code you can print to only the last line outside of a restrictive VIEWPRINT display statement.

Code: QB64: [Select]
  1. PRINT "Pete"
  2. FOR i = 1 TO 16: PRINT i: NEXT
  3. LOCATE 25, 1: PRINT "Steve";
  4. CLS 2

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #26 on: January 26, 2021, 03:01:29 pm »
Yeah,  CLS 2 works great in my test code.

@Pete when you were having trouble with getting to line 1 after a CLS, did you try CLS 0 ? or was it resolved with that?
« Last Edit: January 26, 2021, 03:03:13 pm by bplus »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #27 on: January 26, 2021, 04:31:03 pm »
I think you are referring to what I still consider as RUN and CLEAR unfinished statements in QB64. PRINT even has an interesting issue Steve discovered, after i brought up the glitch in a demo...

PRINT bug: https://www.qb64.org/forum/index.php?topic=3058.msg123319#msg123319

RUN and CLEAR should clear all variables, but they don't: https://www.qb64.org/forum/index.php?topic=794.msg100037#msg100037

I can't recall where the thread was with the RUN "bug" I found. It was some screen locate problem, whch can be resolved with CLS, but I cannot recall the program name associated with that issue. :(

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #28 on: January 26, 2021, 05:08:03 pm »
Thanks @Pete

Yeah this is what I was wondering about:
Code: QB64: [Select]
  1. PRINT "This will not fill the screen, as intended..."
  2. FOR r = 1 TO 25
  3.     FOR c = 1 TO 80
  4.         PRINT RIGHT$(STR$(r), 1);
  5.         _LIMIT 200
  6.     NEXT
  7. CLS 0  ' try with 0
  8. PRINT "But this will..." ' Why does this PRINT statement appear on row #2 in QB64, after a CLS statement?
  9. FOR r = 1 TO 25
  10.     FOR c = 1 TO 80
  11.         LOCATE r, c: PRINT RIGHT$(STR$(r), 1);
  12.         _LIMIT 200
  13.     NEXT
  14.  
  15.  
  16.  
  17.  
  18.  

Even with CLS 0 it mysteriously starts printing on 2nd line?

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: graphs with QB64 and how to scroll the screen.
« Reply #29 on: January 26, 2021, 05:16:19 pm »
Yep, that's the one I thought you meant. I guess it, and the ones from the other thread, just aren't sexy enough bugs to attract any developers.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/