flat assembler
Message board for the users of flat assembler.
Index
> Main > Defining a structure |
Author |
|
Trinitek 24 Jan 2017, 18:42
They're different things.
The first one, struc, is a directive that is provided by FASM. http://flatassembler.net/docs.php?article=manual#2.3.4 The second, struct, is a macro that is defined in win32a.inc. http://flatassembler.net/docs.php?article=win32#1.1 |
|||
24 Jan 2017, 18:42 |
|
jorido 24 Jan 2017, 19:29
Which one and when is used?
|
|||
24 Jan 2017, 19:29 |
|
jorido 25 Jan 2017, 07:38
What if I had a structre with 10 fields, would I have to list all of them as arguments?
Code: struc point a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 { ......... |
|||
25 Jan 2017, 07:38 |
|
revolution 25 Jan 2017, 08:00
If you have a fixed number of arguments then, yes, you have to list them all if you need to initialise the values at the time of definition. If you have a variable number of arguments then you can use square brackets [args] to define the name and loop through the values with forward and reverse.
|
|||
25 Jan 2017, 08:00 |
|
jorido 25 Jan 2017, 09:11
>If you have a fixed number of arguments then, yes, you have to list them all if you need to initialise the values at the time of definition.
If I have a fixed number of them but don't want to initialise the values? Alright, and how about: e) What's the most common convention for naming a structure: MY_STRUCT? Or MyStruct? Or my_struct? Or anything else? |
|||
25 Jan 2017, 09:11 |
|
revolution 25 Jan 2017, 10:19
jorido wrote: If I have a fixed number of them but don't want to initialise the values? jorido wrote: e) What's the most common convention for naming a structure: MY_STRUCT? Or MyStruct? Or my_struct? Or anything else? |
|||
25 Jan 2017, 10:19 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.