hi am getting a line too long error in this part of the code,...don't know why
that's the only error am getting.
the line reported for the error is the first line invoke CreateWindowEx,
invoke CreateWindowEx,
NULL,\ ; No Extended Styles
addr wclassname,\ ; Class Name
addr windowname,\ ; Window Name
WS_OVERLAPPEDWINDOW\ ; Overlapped Window
or WS_HSCROLL\ ; Horizontal Scrollbar
or WS_VSCROLL,\ ; Vertical Scrollbar
CW_USEDEFAULT, ; Default Horizontal Position
CW_USEDEFAULT, ; Default Vertical Position
CW_USEDEFAULT, ; Default width
CW_USEDEFAULT, ; Default height
NULL,\ ; no parent or owner window
NULL,\ ; class menu used
hInstance,\ ; instance handle
NULL ; no window creation data
thanks
I think that its the comments thats causing the problem. You might try removing them first. I remember reading somewhere (iczelion tutorials?) that this can cause masm to complain about the line length.
So try:
; Create my main window etc etc here
invoke CreateWindowEx,
NULL,\
addr wclassname,\
addr windowname,\
WS_OVERLAPPEDWINDOW\
or WS_HSCROLL\
or WS_VSCROLL,\
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,\
NULL,\
hInstance,\
NULL
Best regards
KSR
QuoteI think that its the comments thats causing the problem.
Damn!.....that sucks!!!!!!!
: // : (Wonder what's the actual reason that the comments cause a problem.
Does this happen only on functions using multiple-lines ?l
I removed all comments in that section of the code & it assembles proper.
thankies.
Hi,
Checked iczelions tuts for the source of that issue, but no joy.
I did find a ref in the Masm Reference Doc that i found on my hard dirve (had to search for it, havent looked at it for a long time ;-)
Hope this helps explain why:
A1009 line too long
A line in a source file exceeded the limit of 512 characters.
If multiple physical lines are concatenated with the line-continuation character ( \ ), the resulting logical line is still limited to 512 characters.
So 512 is the limit it seems, including any comments. Not sure where i actually sourced this document, but if you want a copy pm me and i can forward it on to you.
Cheers
KSR
KSR,
many thanks for the info.
It also includes whitespace, so replacing spaces with tabs can really cut down on these problems.
Alternatively, you may get more mileage out of not using the line-continuation character and just relying on MASM knowing that a comma isn't the end of a line (like with the first line: invoke CreateWindowEx,). I'm not sure if it semi-blindly concatenates these in the same way or not.
Cheers,
Zooba :U