flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Main > what can be local? | 
| Author | 
 | 
| Tomasz Grysztar 05 Nov 2006, 01:32 From the preprocessor's point of view there is no difference between your 3 and 1a. While 1b - "locals in procs", as you called it, is a completely different mechanism, happening at the assembly time, not preprocessing. | |||
|  05 Nov 2006, 01:32 | 
 | 
| asmfan 05 Nov 2006, 06:18 thanks, just start understanding more attractive dark corners and snippets because of lack of knowledge in fasm macroses | |||
|  05 Nov 2006, 06:18 | 
 | 
| vid 05 Nov 2006, 16:46 there are 2 things that can be local.
 symbols local to macro, using "local" directive: Code: local a, ..c    symbol local to another symbol. This is when symbol starts with ".", then it's name is prefixed by name of last (non-local) label. eg. these two codes are same: Code: a: .b: .c: Code: a: a.b: a.c: "local"| used to declare procedure's local variables is just macro, unfortunately names same as directive | |||
|  05 Nov 2006, 16:46 | 
 | 
| asmfan 07 Nov 2006, 20:42 So i conclude that making a numeric/symbolic constants in macroses to be LOCAL
 Code: macro some_macro { local my_const my_const = BYTE -1 } is a good practice to prevent the global numeric/symbolic consts from propagation... Right? ;; as a good practice of using "OR" instead of "+" in complicated types definition, e.g. Code: wnd_style = WS_VISIBLE OR WS_POPUP    _________________ Any offers? | |||
|  07 Nov 2006, 20:42 | 
 | 
| vid 08 Nov 2006, 00:13 in fact, you should also prefix local name with ".."
 see the link i provided in my previous post | |||
|  08 Nov 2006, 00:13 | 
 | 
| asmfan 08 Nov 2006, 19:52 Quote: 
 for local labels yes, but local constants don't need to be prefixed | |||
|  08 Nov 2006, 19:52 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.