Das ist noch ein Überbleibsel im obigen Code der nicht mehrDanilo hat geschrieben:Code: Alles auswählen
Structure DISPLAY_FONT x.b[#FONT_W] y.b[#points_vert] EndStructure
gebraucht wird. Eigentlich wollte ich das ja anders machen.
Das ging leider nicht, da PB nicht einmal mehrdimensionale
Felder in Strukturen erlaubt.
Syntax Error:
Code: Alles auswählen
Structure DISPLAY_FONT
font.b[8,8]
EndStructure
Code: Alles auswählen
Structure DISPLAY_FONT
font.b[8][8]
EndStructure
der Sprache fehlt, falls das hier jemand gebrauchen sollte.
Das vereinfacht einfach den Zugriff, und hier sollten auch
mehrdimensionale Felder möglich sein, so wie schon bei Dim.
Ein lauffähiges Beispiel wäre das:
Code: Alles auswählen
Structure FONT_XY
x.b[8]
y.b[8]
EndStructure
Structure DISPLAY_FONT
font.FONT_XY
EndStructure
f.DISPLAY_FONT
For y = 0 To 7
f\font\y[y] = 1
For x = 0 To 7
f\font\x[x] = 1
Next x
Next y
muß man 'um die Ecke denken'.
[EDIT]
LOL... das geht ja garnicht. Das Beispiel erstellt zwei 8er-Felder,
also insgesamt 16 Felder, nicht 8x8 = 64 Felder.
Ich glaube so ist es momentan richtig:
Code: Alles auswählen
Structure FONT_XY
x.b[8]
EndStructure
Structure DISPLAY_FONT
font.FONT_XY[8]
EndStructure
f.DISPLAY_FONT
For y = 0 To 7
For x = 0 To 7
f\font[y]\x[x] = 1
Next x
Next y

[/EDIT]
Einfacher PB-Style wäre eigentlich:
Code: Alles auswählen
Structure DISPLAY_FONT
font.b[8,8]
EndStructure
f.DISPLAY_FONT
For y = 0 To 7
For x = 0 To 7
f\font[x,y] = 1
Next x
Next y