forked from sjbarag/brs
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…74) Co-authored-by: Bronley Plumb <[email protected]>
- Loading branch information
1 parent
cb787ae
commit a1d0a1c
Showing
4 changed files
with
155 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,51 @@ | ||
print Exp(3.1) | ||
print Log(17.4) | ||
print Sqr(11.17) | ||
print Atn(0.5) | ||
print Cos(3.14 / 4) | ||
print Sin(3.14 / 2) | ||
print Tan(3.14 / 4) | ||
print Abs(-3.5) | ||
print Cdbl(17) | ||
print Cint(17.3) | ||
print Csng(204) | ||
print Fix(-2.2) | ||
print Int(7.7) | ||
print Sgn(33.2) | ||
print Sgn(-800) | ||
sub main() | ||
print Exp(3.1) | ||
print Log(17.4) | ||
print Sqr(11.17) | ||
print Atn(0.5) | ||
print Cos(3.14 / 4) | ||
print Sin(3.14 / 2) | ||
print Tan(3.14 / 4) | ||
print Abs(-3.5) | ||
print Cdbl(17) | ||
print Cint(17.3) | ||
print Csng(204) | ||
print Fix(-2.2) | ||
print Int(7.7) | ||
print Sgn(33.2) | ||
print Sgn(-800) | ||
|
||
' Positive numbers | ||
print Fix(10.9) ' 10 | ||
print Int(10.9) ' 10 | ||
print Cint(10.9) ' 11 | ||
|
||
' Negative numbers | ||
print Fix(-10.9) ' -10 | ||
print Int(-10.9) ' -11 | ||
print Cint(-10.9) ' -11 | ||
|
||
' Halfway cases | ||
print Fix(10.5) ' 10 | ||
print Int(10.5) ' 10 | ||
print Cint(10.5) ' 11 | ||
|
||
print Fix(-10.5) ' -10 | ||
print Int(-10.5) ' -11 | ||
print Cint(-10.5) ' -10 | ||
|
||
' Overflow | ||
lng& = 122334343434 | ||
print lng& ' => 122334343434 | ||
print Fix(lng&) ' => 2147483647 | ||
print Int(lng&) ' => 2147483647 | ||
print Cint(lng&)' => 2147483647 | ||
lng& = 2147483649 | ||
print Fix(lng&) ' => 2147483647 | ||
print Int(lng&) ' => 2147483647 | ||
print Cint(lng&)' => 2147483647 | ||
lng& = -2147483649 | ||
print Fix(lng&) ' => 2147483648 | ||
print Int(lng&) ' => 2147483648 | ||
print Cint(lng&)' => 2147483648 | ||
end sub |