Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Officially goin out of my mind. Trivial INT problem
#3
I don't know if IEEE was ever involved with 8-bit computers. But migrating from Color Computer to any IBM PC-Compatible object almost destroyed my faith in "INT()".

@bert22306 I might have been just like you thinking "INT()" should always just shave off the decimal part of a floating-point number, even a negative number. Like "-54.54" should just give "-54", right? But sadly QuickBASIC didn't work that way, "INT()" was made to work a lot like "floor()" in C. When I saw this in the "QuickBASIC Bible" book that I used to own, I weeped. It suggested using "FIX()" for what I wanted. What is even more sad is that more applications created with QuickBASIC and its descendants now rely on how "INT()" works influenced by IEEE, instead of how it worked on a given 8-bit computer.

This behavior has come down to what you have just discovered which is just sad. It could bring someone else (me on some days) to process a floating-point number as a string, search for the darned decimal point and just return whatever is "west" of that decimal point starting with the sign if it exists.

BTW I just don't know why "_ROUND()" was invented LOL, totally worthless to me.
Reply


Messages In This Thread
RE: Officially goin out of my mind. Trivial INT problem - by mnrvovrfc - 10-31-2022, 03:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Int ( money ) inc 5 439 11-30-2025, 12:45 AM
Last Post: hsiangch_ong
  Big problem for me. MystikShadows 11 1,934 01-16-2025, 05:11 AM
Last Post: JRace
  Problem with "MOD" Kernelpanic 5 1,001 01-06-2025, 02:37 AM
Last Post: Pete
  Problem with _Resize dano 7 1,233 10-22-2024, 07:22 PM
Last Post: dano
  Menu Run (No EXE) Problem GareBear 5 1,144 10-06-2023, 05:41 AM
Last Post: GareBear

Forum Jump:


Users browsing this thread: 1 Guest(s)