Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QBJS v0.9.0 - Release
#21
(01-20-2025, 10:28 PM)SMcNeill Wrote: Keep in mind, Timer by itself is going to have issues.  If you're looking for better precision, use Timer(0.001).

Ah yes, good tip.
Reply
#22
Maybe that Timer point would fix my issue on my system, I will check.
b = b + ...
Reply
#23
(01-20-2025, 10:42 PM)bplus Wrote: Maybe that Timer point would fix my issue on my system, I will check.

If it's an issue with timing and _DELAY, I wouldn't think so.  I didn't actually change the delay any in the code before.  All Timer(0.001) does is try and return a more accurate version of the time for you to store in your variable; it's not changing that _DELAY difference at all.
Reply
#24
@Smcneill No a Timer was being used in place of a Delay so as not to interrupt the smoothness of execution in the Play Demo of PLAY. You can see where the issue comes up in that thread.
Reply #9 https://qb64phoenix.com/forum/showthread...7#pid31387
It's the old clearing of a mousebutton down problem without missing the next.

Honestly I am not getting it, but dbox says its better that way. It's dbox way. Smile It works.

I know Steve has a way, Pete has a way, Old Moses has a way, even bplus has a way but he can never remember it when writing code on the fly. Delay .25 works well enough for him.
b = b + ...
Reply
#25
@bplus Pete's way is being expanded. https://qb64phoenix.com/forum/showthread.php?tid=3402

I'm switching the keyboard portion over to _keyhit.

I love how you defend how the _delay part works for you. Now do this. Step 1, get married. Step 2, open an office and write software to run it. Step 3) have your wife use your software to run your office.

Oh, there's more...

Step 4) Hire a really hot divorce lawyer. Step 5) Divorce your current wife. Step 6) Marry your attorney to get your money back.

@SpriggsySpriggs knows I'm 7/8ths kidding. The other part is all about the Benjamins. 

Okay, fine. I really am kidding about the divorce part. What really happened is my wife would come up with what I later realized were great suggestions for the programs, and I would finally implement them upon reentry. No Steve, I'm talking about blowing up into outer space, not what you're thinking about! I mean I'd hear her describe, in about 10 words or less, what she wanted the program to do, and then I had to explain to her that would take a week or more to code and dammit, I already had a tee time on the books! Anyway, truth be told, I'd rather cut off both arms than leave my wife, of course if she left me after that move, I'd be really screwed. No Steve... because I wouldn't be able to type code anymore. Geeze!!!! @SMcNeill

Pete
Reply
#26
LOL that Pete!

I sorta had that experience without the wife. I made up some data base code and data entery forms for business I was working at. Their 386(? was it) was jammed packed with a data base whose record structure wasted tons of room. I want to brag about more of this but long story short the secretary who had to use the thing for tons and tons of inventory slips had several good suggestions on how to improve data entry form. Very Positive experience nothing to get divorced about.

Now what does all this have to do with QBJS? you may ask.

Well we all wished back then we had something that did not have to have Windows and definitely did not have overly priced IBM consultants to tell you how to run your business on their overly priced IBM sysytem. Its enough to make you learn coding for yourself.

QBJS is the answer to those wishes. Heart
b = b + ...
Reply
#27
Maintenance release 0.9.1 is now live with the following fixes:
  • PLAY was not correctly extending the note duration when "." was encountered. (#126)
  • Updated _FileExists to correctly return status of files from relative URLs. (#118)
  • Updated _LoadFont to correctly load font resources from relative URLs. (#118)
  • Updated Str$ to correctly include a space before a positive number. (#123)

Thanks to everyone who reported bugs.  In particular, @bplus and @a740g, this release should fix the issues you reported for Str$ formatting and PLAY, respectively.
Reply
#28
So, QBJS is a web browser Html/Javascript IDE parser which works well with FireFox..

This did not work:

Code: (Select All)
On Timer Gosub Display
Timer On
For V=1 to 10
  Print str$(V);" ";
Next
Print "Press key:"
Do
  _Limit 75
  x$=Inkey$
  If Len(x$) Then Exit Do
Loop
Timer Off
End
Display:
Print Rnd
Return
Reply
#29
(01-15-2025, 05:50 AM)bplus Wrote: @dbox Call the fish thing Texting Fish.

That was it! It just needed a _limit to delay the loop around. I think I fixed someone else problem the same! Yikes what a memory.

I cleaned up the code for Sliding Block Puzzle, you can replace that "15 Squares Puzzle" with this, it's way better!


You can't see it here but title flashes when puzzle is solved with number of moves and time in secs then jumps into another puzzle.

Also I noticed 2 things comparing QBJS code and QB64:
1) str$(number) in QBJS does not leave that space before a positive number as in QB64, so you have to _TRIM$() in QB64 so they look the same in print.
2) the _delay amounts aren't matching up, ie flashing that solved message in QB64 is way faster than in QBJS. had to fiddle to get a compromise.
Yeah I am still into having both codes work as closley to the same way as possible.

Love it!
Simple enough for me to play, hard enough to challenge my Grandkids!
I think I earned more than a flashing title-bar for solving it though. How 'bout the Congrats inside the frame, and a fanfare???  Big Grin
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#30
(04-09-2025, 02:46 AM)eoredson Wrote: So, QBJS is a web browser Html/Javascript IDE parser which works well with FireFox..

This did not work…

Yes, while one of the goals of the project is to provide as much compatibility as feasible without sacrificing performance, there are a number of keywords not supported in QBJS (yet).  The list of supported and unsupported keywords is maintained here:

Supported Keywords
Unsupported Keywords

…and a general overview of language support here:

QBasic Language Support

This particular example doesn’t work because QBJS doesn’t support GOSUB or ON TIMER (yet).
Reply




Users browsing this thread: 1 Guest(s)