News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

struct array declaration error

Started by Rainstorm, July 10, 2011, 02:44:45 PM

Previous topic - Next topic

Rainstorm

tb_btn     TOOLBARBUTTON   dup NUM_BUTTONS { }

NUM_BUTTONS is defined in the .const section as
NUM_BUTTONS equ 5

gives :  error A2008: syntax error : tb_btn

original struct variable name was tb, where i was getting the error too

dedndave

tb_btn     TOOLBARBUTTON   NUM_BUTTONS dup (<>)
will probably work

QuoteNUM_BUTTONS is defined in the .const section as
NUM_BUTTONS equ 5

EQUates are assembler constants
they do not need to be defined in a section, nor do they create any data or take space in the EXE

Rainstorm

tb_btn     TOOLBARBUTTON   NUM_BUTTONS dup    (<>)
that doesn't work either, and throws the same error msg

EDIT: i'd tried a few things including tb_btn     TOOLBARBUTTON   NUM_BUTTONS dup    ({}) before posting

Rainstorm

heck!, there isn't any structure named TOOLBARBUTTON its TBBUTTON
my bad
thx

Gunner

Shouldn't it be:
tb_btn TBBUTTON NUM_BUTTONS dup (<>)

Ah, you beat me to it...
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com