-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
246 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
$CONSOLE:ONLY | ||
|
||
OPTION _EXPLICIT | ||
|
||
CONST CF! = 3.141592653589793239 | ||
CONST CI%& = 255 | ||
|
||
TYPE t | ||
f AS SINGLE | ||
i AS _OFFSET | ||
END TYPE | ||
|
||
DIM f AS SINGLE: f = CF | ||
DIM i AS _OFFSET: i = CI | ||
|
||
DIM t AS t | ||
t.f = f | ||
t.i = i | ||
|
||
DIM a(1) AS SINGLE | ||
a(0) = f | ||
a(1) = _CAST(SINGLE, i) | ||
|
||
PRINT _CAST(_BYTE, CF) | ||
PRINT _CAST(_BYTE, CI) | ||
PRINT _CAST(_BYTE, f * 2) | ||
PRINT _CAST(_BYTE, i * 2) | ||
PRINT _CAST(_BYTE, t.f) | ||
PRINT _CAST(_BYTE, t.i) | ||
PRINT _CAST(_BYTE, a(0) * 2) | ||
PRINT _CAST(_BYTE, a(1) * 2) | ||
|
||
PRINT _CAST(_UNSIGNED _BYTE, CF) | ||
PRINT _CAST(_UNSIGNED _BYTE, CI) | ||
PRINT _CAST(_UNSIGNED _BYTE, f * 2) | ||
PRINT _CAST(_UNSIGNED _BYTE, i * 2) | ||
PRINT _CAST(_UNSIGNED _BYTE, t.f) | ||
PRINT _CAST(_UNSIGNED _BYTE, t.i) | ||
PRINT _CAST(_UNSIGNED _BYTE, a(0) * 2) | ||
PRINT _CAST(_UNSIGNED _BYTE, a(1) * 2) | ||
|
||
PRINT _CAST(INTEGER, CF) | ||
PRINT _CAST(INTEGER, CI) | ||
PRINT _CAST(INTEGER, f * 2) | ||
PRINT _CAST(INTEGER, i * 2) | ||
PRINT _CAST(INTEGER, t.f) | ||
PRINT _CAST(INTEGER, t.i) | ||
PRINT _CAST(INTEGER, a(0) * 2) | ||
PRINT _CAST(INTEGER, a(1) * 2) | ||
|
||
PRINT _CAST(_UNSIGNED INTEGER, CF) | ||
PRINT _CAST(_UNSIGNED INTEGER, CI) | ||
PRINT _CAST(_UNSIGNED INTEGER, f * 2) | ||
PRINT _CAST(_UNSIGNED INTEGER, i * 2) | ||
PRINT _CAST(_UNSIGNED INTEGER, t.f) | ||
PRINT _CAST(_UNSIGNED INTEGER, t.i) | ||
PRINT _CAST(_UNSIGNED INTEGER, a(0) * 2) | ||
PRINT _CAST(_UNSIGNED INTEGER, a(1) * 2) | ||
|
||
PRINT _CAST(LONG, CF) | ||
PRINT _CAST(LONG, CI) | ||
PRINT _CAST(LONG, f * 2) | ||
PRINT _CAST(LONG, i * 2) | ||
PRINT _CAST(LONG, t.f) | ||
PRINT _CAST(LONG, t.i) | ||
PRINT _CAST(LONG, a(0) * 2) | ||
PRINT _CAST(LONG, a(1) * 2) | ||
|
||
PRINT _CAST(_UNSIGNED LONG, CF) | ||
PRINT _CAST(_UNSIGNED LONG, CI) | ||
PRINT _CAST(_UNSIGNED LONG, f * 2) | ||
PRINT _CAST(_UNSIGNED LONG, i * 2) | ||
PRINT _CAST(_UNSIGNED LONG, t.f) | ||
PRINT _CAST(_UNSIGNED LONG, t.i) | ||
PRINT _CAST(_UNSIGNED LONG, a(0) * 2) | ||
PRINT _CAST(_UNSIGNED LONG, a(1) * 2) | ||
|
||
PRINT _CAST(_INTEGER64, CF) | ||
PRINT _CAST(_INTEGER64, CI) | ||
PRINT _CAST(_INTEGER64, f * 2) | ||
PRINT _CAST(_INTEGER64, i * 2) | ||
PRINT _CAST(_INTEGER64, t.f) | ||
PRINT _CAST(_INTEGER64, t.i) | ||
PRINT _CAST(_INTEGER64, a(0) * 2) | ||
PRINT _CAST(_INTEGER64, a(1) * 2) | ||
|
||
PRINT _CAST(_UNSIGNED _INTEGER64, CF) | ||
PRINT _CAST(_UNSIGNED _INTEGER64, CI) | ||
PRINT _CAST(_UNSIGNED _INTEGER64, f * 2) | ||
PRINT _CAST(_UNSIGNED _INTEGER64, i * 2) | ||
PRINT _CAST(_UNSIGNED _INTEGER64, t.f) | ||
PRINT _CAST(_UNSIGNED _INTEGER64, t.i) | ||
PRINT _CAST(_UNSIGNED _INTEGER64, a(0) * 2) | ||
PRINT _CAST(_UNSIGNED _INTEGER64, a(1) * 2) | ||
|
||
PRINT _CAST(_OFFSET, CF) | ||
PRINT _CAST(_OFFSET, CI) | ||
PRINT _CAST(_OFFSET, f * 2) | ||
PRINT _CAST(_OFFSET, i * 2) | ||
PRINT _CAST(_OFFSET, t.f) | ||
PRINT _CAST(_OFFSET, t.i) | ||
PRINT _CAST(_OFFSET, a(0) * 2) | ||
PRINT _CAST(_OFFSET, a(1) * 2) | ||
|
||
PRINT _CAST(_UNSIGNED _OFFSET, CF) | ||
PRINT _CAST(_UNSIGNED _OFFSET, CI) | ||
PRINT _CAST(_UNSIGNED _OFFSET, f * 2) | ||
PRINT _CAST(_UNSIGNED _OFFSET, i * 2) | ||
PRINT _CAST(_UNSIGNED _OFFSET, t.f) | ||
PRINT _CAST(_UNSIGNED _OFFSET, t.i) | ||
PRINT _CAST(_UNSIGNED _OFFSET, a(0) * 2) | ||
PRINT _CAST(_UNSIGNED _OFFSET, a(1) * 2) | ||
|
||
PRINT USING "#####.###"; _CAST(SINGLE, CF) | ||
PRINT USING "#####.###"; _CAST(SINGLE, CI) | ||
PRINT USING "#####.###"; _CAST(SINGLE, f * 2) | ||
PRINT USING "#####.###"; _CAST(SINGLE, i * 2) | ||
PRINT USING "#####.###"; _CAST(SINGLE, t.f) | ||
PRINT USING "#####.###"; _CAST(SINGLE, t.i) | ||
PRINT USING "#####.###"; _CAST(SINGLE, a(0) * 2) | ||
PRINT USING "#####.###"; _CAST(SINGLE, a(1) * 2) | ||
|
||
PRINT USING "#####.###"; _CAST(DOUBLE, CF) | ||
PRINT USING "#####.###"; _CAST(DOUBLE, CI) | ||
PRINT USING "#####.###"; _CAST(DOUBLE, f * 2) | ||
PRINT USING "#####.###"; _CAST(DOUBLE, i * 2) | ||
PRINT USING "#####.###"; _CAST(DOUBLE, t.f) | ||
PRINT USING "#####.###"; _CAST(DOUBLE, t.i) | ||
PRINT USING "#####.###"; _CAST(DOUBLE, a(0) * 2) | ||
PRINT USING "#####.###"; _CAST(DOUBLE, a(1) * 2) | ||
|
||
PRINT USING "#####.###"; _CAST(_FLOAT, CF) | ||
PRINT USING "#####.###"; _CAST(_FLOAT, CI) | ||
PRINT USING "#####.###"; _CAST(_FLOAT, f * 2) | ||
PRINT USING "#####.###"; _CAST(_FLOAT, i * 2) | ||
PRINT USING "#####.###"; _CAST(_FLOAT, t.f) | ||
PRINT USING "#####.###"; _CAST(_FLOAT, t.i) | ||
PRINT USING "#####.###"; _CAST(_FLOAT, a(0) * 2) | ||
PRINT USING "#####.###"; _CAST(_FLOAT, a(1) * 2) | ||
|
||
SYSTEM |
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 |
---|---|---|
@@ -0,0 +1,104 @@ | ||
3 | ||
-1 | ||
6 | ||
-2 | ||
3 | ||
-1 | ||
6 | ||
-2 | ||
3 | ||
255 | ||
6 | ||
254 | ||
3 | ||
255 | ||
6 | ||
254 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3 | ||
255 | ||
6 | ||
510 | ||
3.142 | ||
255.000 | ||
6.283 | ||
510.000 | ||
3.142 | ||
255.000 | ||
6.283 | ||
510.000 | ||
3.142 | ||
255.000 | ||
6.283 | ||
510.000 | ||
3.142 | ||
255.000 | ||
6.283 | ||
510.000 | ||
3.142 | ||
255.000 | ||
6.283 | ||
510.000 | ||
3.142 | ||
255.000 | ||
6.283 | ||
510.000 |