This is some code NaN posted to help me with using structures.

The error i'm getting is error 2008...syntax error "Point1"

Isn't Point1 being defined in the data section below?

I've seen similar syntax in stuff iv'e downloaded from the board.

How do yall get yours to work.

Mine just won't compile.

Any help appreciated
______________________________________
My_Point struc
x dd ?
y dd ?
My_Point ends
___________________________________________

DATA.
Point1 My_Point <0,0> ; initialize x,y to 0,0
Point2 My_Point <2,0> ; initialize x,y to 2,0
Posted on 2001-10-06 22:10:19 by titan
Aside from the {field list} vs <field list> I do this all the time.



.DATA
WinData WNDCLASSEX {SIZEOF WNDCLASSEX, CS_HREDRAW or CS_VREDRAW,\
OFFSET WinProc, NULL, NULL, ?, ?, ?, COLOR_APPWORKSPACE,\
OFFSET MenuName, OFFSET WinClass, ?}


It isn't the point needing to be in front of the data like .DATA & not data. is it? & you're just getting the error on the next line?
Posted on 2001-10-06 22:17:05 by rafe
Rafe i just type data. by accident

the error i'm getting is like i stated

it wont compile because it gives me a syntax error for

"Point1"

I'm asking isn't Point1 being defined with :

.data
Point1 My_Point <0,0> ; initialize x,y to 0,0
Posted on 2001-10-06 22:22:27 by titan
Just plunked your code into a proggie I'm working on & it assembled & linked just fine. Put the struc above the .const & the 2 points just below the .data & way above the .data? exactly like you had in the post. Sorry but I can't reproduce the error.
Posted on 2001-10-06 22:39:39 by rafe
Thanx rafe

That solved the problem

Below is the list of my includes.
I'm trying to keep my prog modular and so i keep all macros ,structures, data, uninitialized data and so forth in include files. Let me know if you see anything wromg with the order of my includes. (That are now corrected in so much as your suggestion)

thanx again
that was a nasty bug for about a week
:alright: .386


.model flat,stdcall
OPTION SCOPED
option casemap:none

WinMain proto :DWORD,:DWORD,:DWORD,:DWORD
SETGAME PROTO :DWORD
GETARRAYSIZE PROTO :DWORD

include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\gdi32.inc
include \masm32\include\winmm.inc

includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\winmm.lib

include d:\masm32\mystuff\gamestruct.asm
include d:\masm32\mystuff\gamemacros.asm

include d:\masm32\mystuff\gamedata.asm
include d:\masm32\mystuff\gamedatani.asm
include d:\masm32\mystuff\gameconst.asm

include d:\masm32\mystuff\gamethread.asm
Posted on 2001-10-06 23:03:38 by titan