Font 2:Randomize:Cls Rnd(8^8)
Declare a![1323,50,20],b![50,100],c![50],d!,e![]
Declare a$[0,0,0],b$[1,0],c$[0],e$,f$[]
Declare x&,y&,z&, type$,di& '= Dimensionen (0: Skalar)
'Parameterwert in the Klammer testweise swap:
GetXYZ( a![] ) ' occupied variables type$, di& and, if
' meaningfully The variables x&,y&,z&
WaitInput
End
'----------------------------------------------------
PROC GetXYZ
var pt$=ptype$(1)
var verbose%=1 ' 1: Kontrollausgabe one
type$=mid$(pt$,1,1)
if match$(",[0-9]+,",pt$)>""
x&=val(match$("[0-9]+",match$("~[[0-9]+",pt$) ))
y&=val(match$("[0-9]+",match$(",[0-9]+,",pt$) ))
z&=val(match$("[0-9]+",match$(",[0-9]+~]",pt$) ))
di&=3:case verbose%:print x&,y&,z&,-di&
elseif match$("~[[0-9]+,[0-9]+~]",pt$ )>""
x&=val(match$("[0-9]+",match$("~[[0-9]+",pt$) ))
y&=val(match$("[0-9]+",match$(",[0-9]+~]",pt$) ))
di&=2:case verbose%:print x&,y&,-di&
elseif match$("~[[0-9]+~]",pt$) >""
x&=val(match$("[0-9]+",match$("~[[0-9]+~]",pt$) ))
di&=1:case verbose%:print x&,-di&
elseif match$("~[", pt$ ) = ""
di&=0:case verbose%:print -di&;" Skalarwert"
elseif match$("~[]", pt$ ) > ""
di&=-1:case verbose%:print -di&;": Dynamisches aray!"
else
print "ERROR: Interpretationsfehler ptype in GetXYZ()"
Endif
case verbose%: print "Typ = "; type$
ENDPROC