flat assembler
Message board for the users of flat assembler.

Index > Main > ghost variables

Author
Thread Post new topic Reply to topic
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 28 May 2011, 20:56

It would be nice to have a feature that lets you see the declared variables, but not used ... "the ghost variables". For big projects, it would be helpful.
...and you, do you find this helpful ?

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 28 May 2011, 20:56
View user's profile Send private message Send e-mail Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 676
Location: Mar del Plata
Enko 28 May 2011, 22:27
My guess it will be a great future.
But other guess is that the less global variables is used the best is for the project.
And local variables are destroyed after the proc is done.

But it should be greate to see:
"WARNING: szAlertMsg is declared but not used"

and again, someone will get angry, becous they don't like to see those warnings.
Assembly programers have not quite the same tastes as the visual cpp ones Wink

I used to get tired of the messages: Warning the XXX functions is deprecated, use YYY.
The hell!!!!
Post 28 May 2011, 22:27
View user's profile Send private message Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 28 May 2011, 22:35
Quote:
the less global variables is used the best is for the project.
100% agree with you, but with multi-core development,
the use of global variables is often required.

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 28 May 2011, 22:35
View user's profile Send private message Send e-mail Reply with quote
ctl3d32



Joined: 30 Dec 2009
Posts: 206
Location: Brazil
ctl3d32 28 May 2011, 23:29
fasm is perfect to me the way it is. I think that, for big projects, the most important feature is organization, and it's up to us.
Post 28 May 2011, 23:29
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 29 May 2011, 00:26
Not too hard to do with macros, in fact, "proc" and "import" macros makes use of this to decide if the code/api is worth to be included in the output file or not (by means of "if used proc_name/api_name").

And since sometimes the warnings are wrong (because for instance perhaps your code accesses a variable but using a pointer relative to some other variable), you could use "dummy = variable_wrongly_reported" so fasm will detect the variable is used and hence "used" will report TRUE.
Post 29 May 2011, 00:26
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 29 May 2011, 08:26
Fresh have these features, although "not used variable" is not a clear concept. FASM operates with labels that might or might not to be a "variable".
Anyway, in my understanding, Tomasz prefer to keep FASMW as small and simple as possible.
For me, Fresh is the project, that is aimed to implement such "high level" IDE features. If someone wants to help - the project is open.
Post 29 May 2011, 08:26
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 29 May 2011, 09:57

for me, this should not be a feature of the IDE, but of the compiler.
Code:
fasm toto.asm /uv    
Only the compiler is able to identify unused variables.

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 29 May 2011, 09:57
View user's profile Send private message Send e-mail Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 29 May 2011, 10:04
Of course it is function of the compiler, but the comfortable visualization of the results is function of the IDE. FASM have the feature even now - the "used" operator:
Code:
if ~used myvar
  display "My var is not used"
end if    
Post 29 May 2011, 10:04
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.