The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sometimes it just goes crazy
#1
I was having trouble with a variable not being where I expected. In the end, I have this code:
Code:
FUNCTION SINE(num as FIXED) as FIXED {skipped some code] PRINT at 0,0;((num*32)/90) PRINT INT ((num*32)/90)

So num is a fixed, and the skipped code makes it 0<=num<=90

The routine prints out for those two:
0.35554504......
23301

Now, I'm thinking that INT(0.35) is 0. The compiler landed about 23,000 too high on that one.

Any idea why?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)