Qb64 Manual Pdf ✦ Validated & Official
' DO WHILE / DO UNTIL x = 1 DO WHILE x <= 5 PRINT x x = x + 1 LOOP ' Infinite loop with EXIT DO DO INPUT "Enter password: ", p$ IF p$ = "secret" THEN EXIT DO LOOP
(legacy, but works)
WHILE done% = 0 ' code WEND 6.1 One-Dimensional Arrays DIM scores(1 TO 10) AS INTEGER ' 10 elements scores(1) = 95 FOR i = 1 TO 10 PRINT scores(i) NEXT i 6.2 Dynamic Arrays (Redim) DIM names$() ' empty array REDIM names$(1 TO 5) REDIM _PRESERVE names$(1 TO 10) ' keep existing data 6.3 Multi-Dimensional Arrays DIM grid(5, 5) AS INTEGER ' 6x6 matrix (0-5) FOR row = 0 TO 5 FOR col = 0 TO 5 grid(row, col) = row * col NEXT col NEXT row 6.4 User-Defined Types (TYPE) TYPE Player name AS STRING * 20 ' fixed-length string score AS LONG active AS _BIT END TYPE DIM p AS Player p.name = "Hero" p.score = 1000 Chapter 7: Graphics Programming 7.1 Screen Modes Legacy mode (SCREEN 0-13): qb64 manual pdf
INPUT "Age: ", age LINE INPUT "Full name: ", fullname$ ' allows commas/spaces INPUT$ (1) ' read one key without Enter 5.1 Conditional Statements IF...THEN...ELSE ' DO WHILE / DO UNTIL x =
' Main loop DO _LIMIT 60 CLS
laser& = _SNDOPEN("laser.wav") _SNDPLAY laser& age LINE INPUT "Full name: "