We have the following (MASM):
TRACE_MAX EQU 21
TTrace STRUCT
Coo BASS_3DVECTOR <>
Alpha GLfloat ?
TTrace ends
TShapeTrace STRUCT
Trace TTrace TRACE_MAX dup (<>)
TShapeTrace ends
.data?
Shaper TShapeTrace 701 dup (<>) ; error
I can not understand how to properly describe the variable Shaper. Keep getting a message about an incorrect initialization of the structure. What is correct? I looked through all the sources for MASM, there is nothing similar.
Try this:
include \masm32\include\masm32rt.inc
TRACE_MAX EQU 21
BASS_3DVECTOR STRUCT
x dd ?
y dd ?
z dd ?
BASS_3DVECTOR ENDS
TTrace STRUCT
Coo dd ? ; BASS_3DVECTOR <>
Alpha dd ? ;GLfloat ?
TTrace ends
TShapeTrace STRUCT
Trace TTrace TRACE_MAX dup (<>)
TShapeTrace ends
.data?
Shaper TShapeTrace 701 dup (<>) ; error
.code
AppName db "Masm32:", 0
start: MsgBox 0, "Hello World", addr AppName, MB_OK
exit
end start
The same mistake:
...
.data?
Shaper TShapeTrace 701 dup (<>)
error A2177: nested structure improperly initialized
Full example, but it will work only with JWasm. Don't ask me why ::)
include \masm32\include\masm32rt.inc
TRACE_MAX EQU 21
BASS_3DVECTOR STRUCT
x dd ?
y dd ?
z dd ?
BASS_3DVECTOR ENDS
TTrace STRUCT
Coo BASS_3DVECTOR <>
Alpha REAL4 ? ; GLfloat ?
TTrace ends
TShapeTrace STRUCT
Trace TTrace TRACE_MAX dup (<>)
TShapeTrace ends
.data?
Shaper TShapeTrace 701 dup (<>) ; error
.code
AppName db "Masm32:", 0
start: MsgBox 0, "Hello World", addr AppName, MB_OK
exit
end start
Alas, I only have MASM.
This a nasty bug!
Using a dummy structure may helps you:
s STRUCT
Trace TTrace TRACE_MAX dup ({})
s ends
TShapeTrace STRUCT
Trace s <>
TShapeTrace ends
...
Shaper TShapeTrace 701 dup ({})
Hooray, helped. Thank you.
Quote from: angvelem on November 12, 2011, 09:13:47 PM
Alas, I only have MASM.
http://www.japheth.de/JWasm.html#jwdownload - and you only need to replace \masm32\bin\ml.exe with jwasm.exe
Keep a copy of ml.exe, though - there are rare cases where Jwasm chokes over something.
qWord, is that a known Masm bug?
I have already found their website and downloaded the JWASM.
Quote from: jj2007 on November 12, 2011, 11:23:39 PM
http://www.japheth.de/JWasm.html#jwdownload - and you only need to replace \masm32\bin\ml.exe with jwasm.exe
Keep a copy of ml.exe, though - there are rare cases where Jwasm chokes over something.
Very bad compiler, include files from libraries BASS does not understand
Quote from: angvelem on November 16, 2011, 07:16:20 PM
Very bad compiler
It's called assembler, not compiler. And the problem might well be in your include files.
It is you are talking to myself? Very noticeable on your behavior. Not respecting other, you do not respect yourself.
Removed the offending message? It means you are not quite yet lost man
Include file is not my, he out of the library BASS.
Quote from: jj2007 on November 12, 2011, 11:23:39 PM
qWord, is that a known Masm bug?
Well, I know this error :bg
IIRC there was also a discussion here ...
Quote from: qWord on November 16, 2011, 08:42:27 PM
IIRC there was also a discussion here ...
This one (http://www.masm32.com/board/index.php?topic=13125.0) or that one (http://www.masm32.com/board/index.php?topic=16283.msg134639#msg134639)?
Quote from: jj2007 on November 16, 2011, 09:21:16 PM
Quote from: qWord on November 16, 2011, 08:42:27 PM
IIRC there was also a discussion here ...
This one (http://www.masm32.com/board/index.php?topic=13125.0) or that one (http://www.masm32.com/board/index.php?topic=16283.msg134639#msg134639)?
no,
but I've found this one with exact the same problem:
http://www.masm32.com/board/index.php?topic=1700.0
Here (http://www.masm32.com/board/index.php?topic=13758.msg108161#msg108161) is another thread.
Another workaround - not elegant but it works:
.DATA?
car MOVER <>
REPEAT 9
MOVER <>
ENDM
Quote from: jj2007 on November 16, 2011, 11:12:50 PMAnother workaround - not elegant but it works
fortunately such structure configurations are very rare, thus this or any other workaround are acceptable :P
(?)
Hmm, this option is also interesting.