hi

i have defined the following structure:


MLV_COLUMN STRUCT
cName DB 80 DUP (?)
cWidth DD ?
MLV_COLUMN

but how do i setup this, i mean how do i pass a string to it? is
THIS possible somehow?


.DATA
mc MLV_COLUMN <"TEST", 80>
Posted on 2002-09-04 08:38:18 by mob
have you tired the following?


.DATA
mc MLV_COLUMN [B]{[/B]"TEST", 80[B]}[/B]
Posted on 2002-09-04 08:50:15 by scientica
thank you, this solved my problems...
Posted on 2002-09-04 20:49:37 by mob
I am just making a suggestion here.

Dont you find that would be more productive to all learning people that read this thread if you explain ( a bit or more ;) of the sintaxe you used for the struct, and why wouldn't <> work in that same matter.

I am a trully begginer in this, and I didn't even figured out WHAT <> does!! :-[

... see you around...
Posted on 2002-09-05 17:29:09 by wicr0s0ft
the first thing you should do is read the manuals... STRUCT is explained very
well in the masm reference. unfortunately it doesn't seem to explain the difference
between <> and {} in detail. i don't want to sound rude but when you have
question you can simply ask for an answer here... but i don't have enough time
to convert every question of mine into a tutorial for beginners :)

this is ripped from the masm help file:



Syntax: name STRUCT [alignment] [, NONUNIQUE]
fielddeclarations
name ENDS

Description:

Declares a structure as a new data type. STRUC is a synonym for
STRUCT and is included for compatibility.

Once a structure name is declared, you can use it to define
variables in which each field not initialized assumes the default
value:

[name] structname <[initializer [, initializer]...]>

or
[name] structname { \
[initializer] \
[, initializer]... \
}
or
[name] structname constant DUP ({[initializer[, initializer]...]})

Curly braces or angle brackets are required even if no initializers
are given. The DUP operator can be used to make duplicate
initializations. Structures may be nested.

You must refer to structure members in the format

structurename.membername or with a pointer to a structure followed
by the .membername tag. You can use multiple sequential membernames
to specify elements of nested structures.


so the only(?) difference is that you can initialize your struct with strings via {}...
Posted on 2002-09-06 08:36:10 by mob
Quote: (mob)
--------------
(...)but i don't have enough time
to convert every question of mine into a tutorial for beginners(...)
--------------

I tottally agree with you, mob. I almost edited my reply to say that if anyone has good suggestions on WHERE exactly we (newbies) can find the right documents that contains our fisrt doubts and wonderings. ... thank you for the explanation, anyway! :)

I myself am trying to begin programming in win32 api, as I did already some assembly. But as it was Zilog Z80 assembly, the sintaxes are the major problem for me. I can read through an medium level tutorial (like the final from Iczelion) and undertand its algorithm. What I cannot o yet, is to WRITE that on my own, by scratch, because I dont undertand all of the sintaxes.
Regards to you.



Enough babbling for so lil, then. Goodbye!

We'll bump in those corridors....


.
.
.
Posted on 2002-09-06 17:04:53 by wicr0s0ft