_Round () issue
#13
No, honestly, they're *exactly* the same thing. Let me share some code for you.

First, the BAS code:

Code: (Select All)
A = Int(-99.5)

And then, if you look in internal/temp, you can see where this code is translated in c-code:

Code: (Select All)
*__SINGLE_A=floor( -99.5E+0 );

If you notice, INT translates directly into floor.  INT is the BASIC equivalent of floor.  It translates one-on-one to the other, and that's why we don't have a _FLOOR command -- BASIC already has INT.  Smile
Reply


Messages In This Thread
_Round () issue - by dcromley - 05-11-2022, 04:08 AM
RE: _Round () issue - by bplus - 05-11-2022, 05:32 AM
RE: _Round () issue - by aurel - 05-11-2022, 09:08 AM
RE: _Round () issue - by SMcNeill - 05-11-2022, 09:47 AM
RE: _Round () issue - by OldMoses - 05-11-2022, 10:33 AM
RE: _Round () issue - by dcromley - 05-11-2022, 05:17 PM
RE: _Round () issue - by dcromley - 05-13-2022, 12:45 AM
RE: _Round () issue - by bplus - 05-13-2022, 01:08 AM
RE: _Round () issue - by SMcNeill - 05-13-2022, 10:49 AM
RE: _Round () issue - by bplus - 05-13-2022, 01:55 PM
RE: _Round () issue - by TarotRedhand - 05-13-2022, 11:16 AM
RE: _Round () issue - by SMcNeill - 05-13-2022, 12:02 PM
RE: _Round () issue - by TarotRedhand - 05-13-2022, 01:07 PM
RE: _Round () issue - by SMcNeill - 05-13-2022, 01:21 PM
RE: _Round () issue - by SMcNeill - 05-13-2022, 02:09 PM
RE: _Round () issue - by bplus - 05-13-2022, 06:03 PM
RE: _Round () issue - by SMcNeill - 05-13-2022, 06:20 PM
RE: _Round () issue - by dcromley - 05-13-2022, 09:28 PM



Users browsing this thread: 5 Guest(s)