home *** CD-ROM | disk | FTP | other *** search
- ' ___________________________________________________________________________
- ' |*************************************************************************|
- ' |*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|
- ' |*| Set TAB to 4 for best readable file layout. |*| Maxon Basic 3.00 |*|
- ' |*|______________________________________________|*|____________________|*|
- ' |*************************************************************************|
- ' |*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|
- ' |*| |*| $Id: StringDemo.BAS (08.12.02) |*|
- ' |*| ###### ###### |*| RhoSigma Source based on NDK 3.1 Includes 40.15 |*|
- ' |*| ## ## ## # |*| _________________________________________________ |*|
- ' |*| ## ## ## |*| |*|
- ' |*| ###### ## |*| Demo to show use of GETSTRING$-SUB in »extra.bc« |*|
- ' |*| ## ## |*| |*|
- ' |*| ## ## # |*| ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ |*|
- ' |*| ## ###### |*| Copyright © 1998-2002 RhoSigma, Roland Heyder |*|
- ' |*| |*| All Rights Reserved. |*|
- ' |*|_______________|*|___________________________________________________|*|
- ' |*************************************************************************|
- ' ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
-
- '$TO StringDemoBAS
- '$ICONS
- '$NOLIBRARY
-
- '$INCLUDE settings.bc
- '$INCLUDE extra.bh
-
- DATA "$VER: StringDemoBAS 3.342 (08.12.02)"
-
- LIBRARY OPEN "extra",3
-
- LINE INPUT "Bitte geben Sie eine Dezimal-Zahl ein: ";z$
- z&=VAL(z$)
- PRINT
-
- b&=Int32ToString&(z&,TRUE%,2)
- o&=Int32ToString&(z&,TRUE%,8)
- h&=Int32ToString&(z&,TRUE%,16)
-
- b$=GETSTRING$(b&)
- o$=GETSTRING$(o&)
- h$=GETSTRING$(h&)
-
- PRINT "Die angegebene Zahl convertiert auf andere Zahlen-Basen:"
- PRINT
- PRINT " binär: ";b$
- PRINT " octal: ";o$
- PRINT "hexadezimal: ";h$
-
- LIBRARY CLOSE
- END
-