Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Various code questions
#2
The "squiggle" just after variable name means "_UNSIGNED". For this reason, which causes confusion, I don't advocate type sigils any longer and would like QB64 to get with the times about function declaration heading (such as "FUNCTION foo(parameters) AS _UNSIGNED _INTEGER64" instead of "FUNCTION foo~&&(parameters)").

The loop including "_MOUSEINPUT" is often used to drain out the mouse message queue, which is very important because this programming system doesn't have something like found in Purebasic, about handling keyboard and mouse input. The routine to deal with the mouse in QB64 are almost quick and dirty. That's why it's more difficult to check for mouse button press then release, to keep track of mousewheel and a few other things than while programming an ordinary Windows application on Purebasic.

"_LIMIT" is helpful to bring down the CPU usage of programs. Without it, your program would be intolerable to other people, even if one of them has an 8-core system. Oh well LOL I don't know about that really. Many programs written for M$QB and Qbasic rely on ordinary "FOR...NEXT" loops to delay program run, which is needed in an arcade game so the enemies don't go too fast on the player. That was good while computers were built with Intel's older processors like 8086. After systems became 32-bit and 64-bit the programming language loops became too blinding fast to use a "FOR... NEXT" arrangement.  The alternative to "_LIMIT" is "_DELAY" but it could be another PITA trying to get precise input from the user and he/she doesn't lose patience.

If you're not an "advanced" programmer you shouldn't be discussing anything about the "_MEM" gang. IJS.
Reply


Messages In This Thread
Various code questions - by james2464 - 08-17-2022, 01:57 PM
RE: Various code questions - by mnrvovrfc - 08-17-2022, 02:09 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 02:09 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 02:13 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 02:21 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 02:30 PM
RE: Various code questions - by OldMoses - 08-17-2022, 04:55 PM
RE: Various code questions - by james2464 - 08-17-2022, 06:30 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 06:35 PM
RE: Various code questions - by james2464 - 08-17-2022, 06:43 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 06:53 PM
RE: Various code questions - by Kernelpanic - 08-17-2022, 08:32 PM
RE: Various code questions - by SMcNeill - 08-17-2022, 09:25 PM
RE: Various code questions - by Kernelpanic - 08-18-2022, 01:31 PM



Users browsing this thread: 3 Guest(s)