Habe gerade mal mit PType$() experimentiert.
Die normalen Variablentypen einschl. Bereich#
kann man ja mit @$,&(X) usw. erfassen.
Aber wie bekomme ich das mit dynamischen
oder festen Arrays hin ?
Code
Declare t$, bereich#, c&, d$[]
Declare Quad a, Int b
WindowTitle "TEST - FENSTER"
Window 800, 500
Dim bereich#, 10
String bereich#, 0 = "Hallo"
d$[0] = "Erster String !"
a = 5
b = 10
c& = 20
t$ = "Hallo"
Test(d$[])
Waitkey
Dispose bereich#
End
Proc Test
Parameters a$
Declare tmp$[], tmp&[] ' temp. Arrays
Select PType$(1)
CaseOf "Q[]"
Print "Dynamisches Quad - Array !"
CaseOf "$[]"
Print "Dynamisches String - Array !"
CaseOf "Q"
Print "Quad Int !"
Print @&(1)
CaseOf "&"
Print "Zahl ! (&)"
Print @&(1)
CaseOf "%"
Print "Zahl ! (%)"
Print @%(1)
CaseOf "S"
Print "SINGLE !"
Print @&(1)
CaseOf "!"
Print "Float (!) !"
Print @!(1)
CaseOf "$"
Print "Zeichenkette !"
Print @$(1)
CaseOf "b"
Print "Bereich !"
Print String$(@&(1), 0)
EndSelect
EndProc
Alles anzeigen