Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 483
» Latest member: aplus
» Forum threads: 2,795
» Forum posts: 26,319
Full Statistics
|
Latest Threads |
What do you guys like to ...
Forum: General Discussion
Last Post: SMcNeill
15 minutes ago
» Replies: 4
» Views: 47
|
GNU C++ Compiler error
Forum: Help Me!
Last Post: a740g
31 minutes ago
» Replies: 3
» Views: 88
|
Fast QB64 base64 encoder ...
Forum: a740g
Last Post: a740g
11 hours ago
» Replies: 3
» Views: 444
|
Mean user base makes Stev...
Forum: General Discussion
Last Post: bobalooie
Today, 03:43 AM
» Replies: 7
» Views: 200
|
_IIF limits two question...
Forum: General Discussion
Last Post: bplus
Today, 02:56 AM
» Replies: 6
» Views: 113
|
DeflatePro
Forum: a740g
Last Post: a740g
Today, 02:11 AM
» Replies: 2
» Views: 67
|
New QBJS Samples Site
Forum: QBJS, BAM, and Other BASICs
Last Post: dbox
Yesterday, 06:16 PM
» Replies: 25
» Views: 897
|
Raspberry OS
Forum: Help Me!
Last Post: Jack
Yesterday, 05:42 PM
» Replies: 7
» Views: 155
|
InForm-PE
Forum: a740g
Last Post: Kernelpanic
Yesterday, 05:22 PM
» Replies: 80
» Views: 6,168
|
Merry Christmas Globes!
Forum: Programs
Last Post: SierraKen
Yesterday, 03:46 AM
» Replies: 10
» Views: 141
|
|
|
Extended KotD #3: _NEGATE |
Posted by: SMcNeill - 05-09-2024, 05:55 PM - Forum: Keyword of the Day!
- Replies (3)
|
|
Now this entry should be a fairly short one for you guys, as it's just finishing up the last of our new LOGICAL operations -- _NEGATE.
As you guys should know by now, AND/OR are *binary* operators, while _ANDALSO/_ORELSE are *logical* operators. The first set does binary math comparison; the second set of commands simply check if values are 0 (FALSE) or not (TRUE).
Along the exact same line as these commands, we have both the old *binary* NOT and the new *logical* _NEGATE.
NOT takes a value and basically flips all the bits in it. For example, let's look at NOT 1:
00000001 <-- this is the 8-bit representation of 1 that is stored in a byte.
------------ <-- so lets apply NOT to that value here
11111110 <-- and there's the binary representation of what NOT 1 looks like.
NOT toggles bits for a number.
Now, as for _NEGATE, what does it do as a *logical* operator??
It returns the opposite of TRUE (-1) and FALSE (0) to us . A few brief examples would probably be best to clear up any misunderstanding here:
_NEGATE 1 = 0
_NEGATE 0 = -1
_NEGATE 14 = 0
_NEGATE 123.12 = 0
In BASIC, anything non-zero is considered TRUE, while *ONLY* zero is considered FALSE.
Logically, when you _NEGATE anything TRUE, you get back FALSE.... So if you _NEGATE any non-zero value, you will get back a return value of 0.
And if you _NEGATE a false value, you get back TRUE... In this case, the result is always going to be -1 -- what I guess we could consider to be *ABSOLUTE TRUE*.
NOT -1 = 0 ' NOT TRUE = FALSE
NOT 0 = -1 ' NOT FALSE = TRUE
When dealing with NOT, only 0 and -1 have this TRUE/FALSE inverse to them. Any other values will NOT TRUE = TRUE, as shown below:
NOT 1 = -2 '1 is TRUE, but -2 is also TRUE as it's non-zero
NOT -2 = 1' as above.
_NEGATE doesn't have this issue, as it only returns -1 and 0 as values. If you logically _NEGATE the truth of something, you end up with FALSE.
_NEGATE basically:
1) Returns 0 as the result for any non-zero value you negate.
2) Returns -1 as the result, if you send it a value of zero.
It's that simple of a command, at the end of the day.
|
|
|
Question about Window Width in IDE menu |
Posted by: TerryRitchie - 05-09-2024, 04:38 PM - Forum: General Discussion
- Replies (3)
|
|
I had a reader email me with a question regarding the new IDE lesson I just posted.
In the Options menu of the IDE and then inside Display is the Window width: input field based on characters per line in relation to mono-spaced or proportional fonts?
I'm pretty sure there is no difference, characters per line is characters per line regardless, but I want to clarify so that I have the correct information.
|
|
|
QB64 Tutorial IDE Lesson Added |
Posted by: TerryRitchie - 05-09-2024, 02:01 AM - Forum: Learning Resources and Archives
- Replies (6)
|
|
A new side lesson, Using the IDE (getting the most out of it), has been added to the tutorial.
I've been working on and off on this HUGE side lesson for almost 6 months now. It contains 75 illustrations, some of them animated.
Before adding the lesson I read through it a few times looking for typos but I'm sure I probably missed a few. Please let me know if you find any.
This side lesson is best viewed by beginners after going through lessons 1 through 7 first. If you're not a beginner then you'll understand the concepts covered. At the start of lesson 8 a link has been added pointing to the IDE lesson encouraging users to work through it before working on lesson 8.
You can access the IDE lesson here directly.
|
|
|
Odd behavior with Search -> Change window |
Posted by: TerryRitchie - 05-08-2024, 09:49 PM - Forum: General Discussion
- Replies (8)
|
|
To recreate the bug:
Type in some code in the IDE.
Press ALT-F3 to bring up the Change window
Type something that exists in the code into the Find What: field
Type something to change it to into the Change To: field
press ALT-C to do change all
A message box appears telling you how many substitutions were made.
Press ENTER to remove the message box.
-- The message box did not get removed, the ENTER key was seen by the window underneath.
-- Now the message box reads "match not found" but the window underneath has closed.
|
|
|
control characters in Change dialog box |
Posted by: digitalmouse - 05-08-2024, 06:33 PM - Forum: Help Me!
- Replies (10)
|
|
Greetings, Programs!
Is there a table or list published somewhere (forum, wiki, etc.) that shows the 'control codes', characters, or tokens needed to use characters typically invisible - such as carriage returns, linefeeds, or tabs, for example - in the 'Change...' dialog box in the IDE?
|
|
|
sin cos using SUB SumLocate (x,y,l) |
Posted by: pmackay - 05-08-2024, 06:53 AM - Forum: General Discussion
- Replies (25)
|
|
hey guys. i want to locate a location on using sin,cos....
I am not good a math.
i want it to give me the cords of a given center x,y (center of circle) with location as 360deg from center as in l = 360d input at x,y
so lets say x=200, y=200,l=90 so it returns x,y position - 50pixel from center to l degrees of circle
: x = 150
:
O-----------y = 150
if any one can help thank you...
i need to be able to pick a number from the circle at any one time and have an x,y location. i send x,y,d and it returns x,y from center of x,y circle minus distance in deg.....
hope i said it clear... almost confused myself
|
|
|
The IDE Math Evaluator in Tools |
Posted by: TerryRitchie - 05-07-2024, 07:10 PM - Forum: General Discussion
- Replies (2)
|
|
Is there any documentation pointing to the use of the Math Evaluator found in the Tools menu in the IDE? I've played around with it and it makes sense mostly but it would be nice to know its strengths and weaknesses and any hidden features it might hold.
Also, this would be a far handier tool if there was a quick-key combination associated with it, such as with CTRL-K being used to insert a keyboard scan code. Having to press ALT-T-M just doesn't feel intuitive or easy.
|
|
|
Screen fonts in SCREEN 0 |
Posted by: BDS107 - 05-07-2024, 02:57 PM - Forum: Utilities
- Replies (10)
|
|
In the MS-DOS days of Norton Utilities, PC-Tools, etc., you would see programs redrawing their ASCII characters to get different boxes and characters.
We can easily create font files via the VGA Font Editor (see https://github.com/a740g/VGA-Font-Editor).
But how do we get this on the screen via SCREEN 0? No not SCREEN 13 or so.
I used to write an assembler program for that, but I've lost it, years ago....
|
|
|
|