i've a structure like this:
FELD struct
besitzerid dd ?
kaufpreis dd ?
verkaufspreis dd ?
hauspreis dd ?
hotelpreis dd ?
anzh dd ?
anzhot dd ?
miete dd ?
miete1 dd ?
miete2 dd ?
miete3 dd ?
miete4 dd ?
miete5 dd ?
spezialfeldid dd ?
spezialpreis dd ?
strab1 dd ?
strab2 dd ?
strab3 dd ?
FELD ends
when i define some values for the structure i get error A2039. the values are defined like this:
allefelder FELD <0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>, \
<0,1200,600,1000,1000,0,0,40,200,600,1800,3200,5000,0,0,4,0,0>, \
<0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0>, \
<0,1200,600,1000,1000,0,0,80,400,1200,3600,6400,9000,0,0,2,0,0>, \
<0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0>, \
<0,4000,2000,0,0,0,0,250,500,1000,2000,0,0,3,0,16,26,36>, \
<0,2000,1000,1000,1000,0,0,120,600,1800,5400,8000,11000,0,0,9,10,0>, \
<0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0>
actually the error only appears when i try to add one of this <....> at the end. but when this <...> has 2 less values than the others, it works!!??? :confused:
can somebody explain that to me?
This message was edited by [-alloces-], on 6/17/2001 6:25:42 AMAll those backslashes are producing a single text
line which is too long for the assembler. This works:
allefelder FELD <0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>, \
<0,1200,600,1000,1000,0,0,40,200,600,1800,3200,5000,0,0,4,0,0>, \
<0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0>, \
<0,1200,600,1000,1000,0,0,80,400,1200,3600,6400,9000,0,0,2,0,0>,\
<0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0>, \
<0,4000,2000,0,0,0,0,250,500,1000,2000,0,0,3,0,16,26,36>, \
<0,2000,1000,1000,1000,0,0,120,600,1800,5400,8000,11000,0,0,9,10,0>
FELD <0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0>, \
<1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8>
I tried to figure out what happens when you
put too few fields in a structure.
mystruct STRUCT
field1 dd ?
field2 dd ?
field3 dd ?
mystruct ENDS
.data
mystruct1 mystruct <1,2>
dd 3
.code
mov eax,mystruct1.field3
...
EAX now contains 0, not 3. I looked at this
with a debugger and it seems that MASM puts
dd 1,2,0
in the .data section, i.e. it pads out
mystruct1 with 0's.