home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pctchnqs
/
1990
/
number2
/
testdump.bas
< prev
next >
Wrap
BASIC Source File
|
1989-12-09
|
1KB
|
60 lines
DECLARE SUB VarDump (Device$, Target AS ANY, ItSize AS INTEGER)
TYPE TestIt
anInt AS INTEGER
aLong AS LONG
aSingle AS SINGLE
aDouble AS DOUBLE
ALine AS STRING * 16
END TYPE
TYPE Test2
a AS INTEGER
b AS DOUBLE
c AS STRING * 2
END TYPE
DIM TestVar AS TestIt
DIM SecondTest AS Test2
DIM TestVar2 AS TestIt
CLS
TestVar.ALine = "This is a test"
TestVar.anInt = 128
TestVar.aLong = 32000
TestVar.aSingle = 5.35
TestVar.aDouble = 653.35
TestVar2.ALine = "This is a test\\"
TestVar2.anInt = 128
TestVar2.aLong = 32000
TestVar2.aSingle = 5.35
TestVar2.aDouble = 653.35
SecondTest.c = "ab"
SecondTest.a = 1
SecondTest.b = 4
CALL VarDump("SCRN:", VARPTR(SecondTest), LEN(SecondTest))
CALL VarDump("SCRN:", VARPTR(TestVar), LEN(TestVar))
CALL VarDump("SCRN:", VARPTR(TestVar2), LEN(TestVar2))
PRINT "Press any key"
DO
a$ = INKEY$
LOOP UNTIL a$ <> ""
Test$ = "This is a test of looking at strings!"
CALL VarDump("SCRN:", VARPTR(Test$), 4)
CALL VarDump("SCRN:", SADD(Test$), LEN(Test$))
PRINT "Press any key"
DO
a$ = INKEY$
LOOP UNTIL a$ <> ""
Test% = 5
CALL VarDump("SCRN:", VARPTR(Test%), 2)