Code: Select all
dim XVar as ByteVectorData ({ 0, 1, 2})
dim YVar as ByteVectorData Based (XVar + 3) ({ 3, 4, 5})
Code: Select all
dim XVar as ByteVectorData ({ 0, 1, 2})
dim YVar as ByteVectorData Based (XVar + 3) ({ 3, 4, 5})
It just isn't supported. A based variable has no space allocated for it - it's simply an overlay on some other memory. Since there is no space allocated, there is no way to define content as you're trying to do.GTBecker wrote:What's wrong here?
Code: Select all
Dim rawData as ByteVectorData ({ 0, 1, 2, 3, 4, 5 })
Dim XVar() as ProgMem Byte Based rawData.DataAddress + 0
Dim YVar() as ProgMem Byte Based rawData.DataAddress + 3
Sub Main()
Dim i as Integer
Debug.Print "XVar = ";
For i = 1 to 3
If (i > 1) Then
Debug.Print ", ";
End If
Debug.Print XVar(i);
Next i
Debug.Print
Debug.Print "YVar = ";
For i = 1 to 3
If (i > 1) Then
Debug.Print ", ";
End If
Debug.Print YVar(i);
Next i
End Sub
Yes. I encountered an error (line >1023 bytes) and split it up into two Dims - which seemed to not be placed in contiguous code space on a ZX-24.dkinzer wrote:I take it that you're trying to ensure that the data for XVar and YVar are contiguous.
Code: Select all
dim OSDCharTable as bytevectordata ({&h42,&h42,&h42,&h42,&h42,&h42,&h42,&h42, _ ' ........
&h42,&h42,&h42,&h42,&hec,&hed,&hee,&hef, _ ' ........
&hf0,&hf1,&hf2,&hf3,&hf4,&hf5,&hf6,&hf7, _
&hf8,&hf9,&hfa,&hfb,&hfc,&hfd,&hfe,&hff, _
&h00,&h42,&h48,&h42,&h42,&h42,&h42,&h46, _ ' space - '
&h3f,&h40,&h42,&h42,&h45,&h49,&h41,&h47, _ ' ( - /
&h0A,&h01,&h02,&h03,&h04,&h05,&h06,&h07, _ ' 0 - 7
&h08,&h09,&h44,&h43,&h4a,&h42,&h4b,&h42, _ ' 8 - ?
&h4c,&h0b,&h0c,&h0d,&h0e,&h0f,&h10,&h11, _ ' @ - G
&h12,&h13,&h14,&h15,&h16,&h17,&h18,&h19, _ ' H - O
&h1a,&h1b,&h1c,&h1d,&h1e,&h1f,&h20,&h21, _ ' P - W
&h22,&h23,&h24,&h42,&h42,&h42,&h42,&h42, _ ' X - _
&h42,&h25,&h26,&h27,&h28,&h29,&h2a,&h2b, _ ' ` - g
&h2c,&h2d,&h2e,&h2f,&h30,&h31,&h32,&h33, _ ' h - o
&h34,&h35,&h36,&h37,&h38,&h39,&h3a,&h3b, _ ' p - w
&h3c,&h3d,&h3e,&h42,&h42,&h42,&h42,&h42}) ' x - ~
Yes, it does. The lexical analyzer doesn't know anything about the content of a line before it reads it in.GTBecker wrote:Does the indent spacing count?
Code: Select all
Dim rawData as ByteVectorData ({
0,
1, 2, 3,
4,
5
})