File: TEST.BAS

package info (click to toggle)
pcbasic 2.0.7-8
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 35,416 kB
  • sloc: python: 28,411; sh: 103; makefile: 10
file content (10 lines) | stat: -rw-r--r-- 354 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
10 REM PC-BASIC test 
20 REM rounding double to single with overflow to exponent
25 OPEN "OUTPUT.TXT" FOR OUTPUT AS 1
30 X$ = chr$(255)+chr$(255)+chr$(255)+chr$(255)+chr$(255)+chr$(255)+chr$(127)+chr$(128) 
35 PRINT#1, cvd(x$)
40 PRINT#1, csng(cvd(x$))
50 A = cvd(x$): a$ = mks$(a)
60 FOR I%=1 TO 4
70 PRINT#1, hex$(asc(mid$(a$, i%))),
80 NEXT