File: using.yab

package info (click to toggle)
yabasic 1%3A2.91.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,168 kB
  • sloc: ansic: 12,434; sh: 4,417; makefile: 21
file content (18 lines) | stat: -rwxr-xr-x 614 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
print "Check, that print using does not give spurious digits ..."
seen$ = str$(1 + 1/64, "###.###########################")
expected$ = "  1.015625000000000000000000000"
if seen$ <> expected$ then
  print "Formatting a fractional number yields " + seen$ + ", but expecting " + expected$
  exit 2
endif

print "Check, that print using can handle long numbers ..."
x = 1073741824 * 8 * 8
seen$ = str$(x, "#############################")
expected$ = "                  68719476736"
if seen$ <> expected$ then
  print "Formatting a large number yields " + seen$ + ", but expecting " + expected$
  exit 2
endif

exit 0