Author Topic: Small bug in help for TIMER  (Read 2741 times)

0 Members and 1 Guest are viewing this topic.

Offline Jack002

  • Forum Regular
  • Posts: 123
  • Boss, l wanna talk about arrays
    • View Profile
Small bug in help for TIMER
« on: April 09, 2019, 10:35:11 pm »
I'm new to reporting bugs, this one is a baby knat. I see a bugs area here, I have no provision to post there, so someone FW this to the right location.

I'm using QB64 V1.2. I love it. I'm learning more commands, was looking at timer and delay
When you open HELP and go to TIMER, there is a sample program in it (these are so helpful, I copy these into the IDE and play with them all the time)
This one has a small problem:

DO
  PRINT "Hello";
  Delay .5  'accuracy down to .05 seconds or 1/18th of a second in Qbasic
  PRINT "World!";
LOOP UNTIL INKEY$ = CHR$(27) 'escape key exit

Delay is there without the leading _.
I figured it out for myself, but thought I'd mention it. No big deal.

Thanks
Jack
QB64 is the best!

FellippeHeitor

  • Guest
Re: [not really a bug] Small bug in help for TIMER
« Reply #1 on: April 09, 2019, 11:46:42 pm »
Here's the full example in the TIMER help/wiki page:

Code: QB64: [Select]
  1.  
  2.   PRINT "Hello";
  3.   Delay .5  'accuracy down to .05 seconds or 1/18th of a second in Qbasic
  4.   PRINT "World!";
  5. LOOP UNTIL INKEY$ = CHR$(27) 'escape key exit
  6.  
  7.  
  8. SUB Delay (dlay!)
  9. start! = TIMER
  10. DO WHILE start! + dlay! >= TIMER
  11.   IF start! > TIMER THEN start! = start! - 86400
  12. END SUB  
  13.  

This code exemplifies creating a custom SUB Delay (last half of the code block) which uses TIMER, so it's not really a bug.

Offline Jack002

  • Forum Regular
  • Posts: 123
  • Boss, l wanna talk about arrays
    • View Profile
Re: Small bug in help for TIMER
« Reply #2 on: April 10, 2019, 11:58:14 am »
Oh I see! I saw those as separate.
My mistake. Thanks.
QB64 is the best!