Author Topic: Teaching people to program in QB64?  (Read 3133 times)

0 Members and 1 Guest are viewing this topic.

Offline bugmagnet

  • Newbie
  • Posts: 6
    • View Profile
Teaching people to program in QB64?
« on: September 23, 2019, 11:15:18 pm »
I'm learning a few languages over on exercism.io. I imagine QB64 could be one of them. Some suitably motivated individuals could be maintainers and mentors. There might be folk who just want to contribute somehow.

It bugs me that QB64 isn't represented. Mind you it also bugs me that COBOL and Fortran aren't represented as well.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Teaching people to program in QB64?
« Reply #1 on: September 24, 2019, 05:15:22 am »
Who can 'really' know the mind of a programmer? He maybe of the opinion that, qb64 and the like, are 'hobby' languages... Please don't shoot me... I know that qb64 isn't... I'm just voicing my opinion of what Bruce Axtens could possibly think... I suppose the only way to know for sure is to ask him? It is well within the realms of possibility that he didn't even consider qb64...

But, you are right, qb64 should have been represented. Out of sight; Out of mind.

J
Logic is the beginning of wisdom.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Teaching people to program in QB64?
« Reply #2 on: September 26, 2019, 04:01:08 pm »
@johnno56
see here https://dev.to/bugmagnet  at skills/languages of the author 
IMHO the author is open to contribute (https://exercism.io/contribute ) of who is able and has time for a continuative support of a module for learning language by exercise (goal->exercise of development->program to evaluate->evaluation for upgrade level of knowledges-->GOTO goal).
So QB64 can be a candidate in the way it is a robust language of programming and not just a joke to write something in old QB45 or QBasic in 3 different OSes.

1. Who can be elegible to do this? 
2. Must the QB64team  release a patent or a grade of knowledge in QB64?
3. Must be defined roles and rules of QB64 programming?
For example if there is a likeworking keyword between QB and QB64 is deprecated the use of keyword QB (SCREEN 0  or GET graphic image  and PUT graphic image) and thankgiving the use of QB64 keyword (SCREEN _NEWIMAGE(800,600,0)  or _LOADIMAGE and _PUTIMAGE)...
it is possible if QB64 wants to hold the back compatibility with QB and QBasic but  it prefers to go toward the future with its technology... C++ doesn't hate C but it is a little different!
Programming isn't difficult, only it's  consuming time and coffee


Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Teaching people to program in QB64?
« Reply #4 on: October 04, 2019, 05:18:16 pm »
here first  5 lessons on QB64 using Hello World

lesson 1
Code: QB64: [Select]
  1. 'QB64 Hello World
  2. _PRINTSTRING (1, 1), "Hello World" ' output to the screen default like screen 0 of Qbasic
  3.  

lesson 2
Code: QB64: [Select]
  1.  'QB64 Hello World
  2. _TITLE "Hello World 2" ' title of application
  3. _PRINTSTRING (1, 1), "Hello World" 'output
  4.  

lesson 3
Code: QB64: [Select]
  1.  'QB64 Hello World
  2. _TITLE "Hello World 3" ' title of window of application
  3. SCREEN _NEWIMAGE(80, 25, 0) ' this creates a screen of size of SCREEN 0 of Qbasic
  4. _PRINTSTRING (1, 1), "Hello World" ' output to screen

lesson 4
Code: QB64: [Select]
  1.  'QB64 Hello World
  2. _TITLE "Hello world 4"
  3. SCREEN _NEWIMAGE(80, 25, 0) ' emulate SCREEN 0 mode of Qbasic
  4. _PRINTSTRING (INT(_WIDTH / 2) - 5, INT(_HEIGHT / 2)), "Hello World" ' output to the center of screen
  5. END ' end of program

lesson 5
Code: QB64: [Select]
  1.  'QB64 Hello World
  2. _TITLE "Hello world 5"
  3. SCREEN _NEWIMAGE(80, 25, 0) ' emulate SCREEN 0 mode of Qbasic
  4. text$ = "Hello World"
  5. _PRINTSTRING (INT(_WIDTH / 2) - INT(LEN(text$) / 2), INT(_HEIGHT / 2)), text$ ' output to the center of screen
  6. END ' end of program

lesson 6
Code: QB64: [Select]
  1. 'QB64 Hello World
  2. _TITLE "Hello world 6"
  3. SCREEN _NEWIMAGE(80, 25, 0) ' emulate SCREEN 0 mode of Qbasic
  4. COLOR 16, 2 ' set colors for foreground and background
  5. REM in screen 0, 14 is light yellow, 2 is green
  6. text$ = "Hello World"
  7. text2$ = "I'm programming in QB64"
  8. _PRINTSTRING (INT(_WIDTH / 2) - INT(LEN(text$) / 2), INT(_HEIGHT / 2)), text$ ' output to the center of screen
  9. COLOR 14, 1 ' set colors for foreground and background
  10. _PRINTSTRING (INT(_WIDTH / 2) - INT(LEN(text2$) / 2), INT(_HEIGHT / 2) + 2), text2$ ' output centered
  11. COLOR 7, 0
  12. END ' end of program
  13.  
« Last Edit: October 06, 2019, 04:16:08 pm by TempodiBasic »
Programming isn't difficult, only it's  consuming time and coffee