11-08-2022, 04:51 PM
I disagree with some of you. This is a tool that very few languages other than BASIC thought about implementing. It's because this works with floating-point numbers also. What if you need to check if something is zero? Yeah go ahead and use "ABS()" and subtract, multiply and what have you to make your life more complicated!
From the following code in Freebasic, it displays zero:
This should be alike in QB64(PE).
From the following code in Freebasic, it displays zero:
Code: (Select All)
dim j as single, z as single
j = 3.3
z = 1.1 + 1.1 + 1.1
j = j - z
print sgn(j)
This should be alike in QB64(PE).