flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > OOP extension - request for comments.

Goto page Previous  1, 2, 3
Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
revolution wrote:
"begin" only allows the common variables to be declared in one place. Whereas something like clocals/endl allows definitions in any, and multiple, places (or all at the top if so desired).


Did you read the link I posted above? FreshLib allows using "locals" macro inside the body of the procedure (with some special meaning). Or I didn't understood your question properly?

Quote:
Do your macros allow for names without the dot, and give the user the choice to use them or not? If you force it then I'd suggest to make to more flexible for the user.


The dot prefixed labels is the native FASM way to define local labels. But changing "native" to "unnatural" is not my way to do things. I always wandered what people have against dot prefixed labels?

_________________
Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9
Post 28 May 2014, 15:42
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16861
Location: In your JS exploiting you and your system
revolution
JohnFound wrote:
revolution wrote:
"begin" only allows the common variables to be declared in one place. Whereas something like clocals/endl allows definitions in any, and multiple, places (or all at the top if so desired).


Did you read the link I posted above? FreshLib allows using "locals" macro inside the body of the procedure (with some special meaning). Or I didn't understood your question properly?
I was using your terminology of "common" variables. And I meant only the common variables in my above comment. The other overlapping locals is a separate thing. Note my usage of clocals/endl to differentiate it from locals/endl
Post 28 May 2014, 15:51
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
revolution wrote:
I was using your terminology of "common" variables. And I meant only the common variables in my above comment. The other overlapping locals is a separate thing. Note my usage of clocals/endl to differentiate it from locals/endl


But if they are "common" they need to be defined on "common" place in the source. The place between "proc" and "begin" is exactly such common for the whole procedure place.

_________________
Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9
Post 28 May 2014, 15:54
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
Is this starting to look like Object Pascal?
Post 28 May 2014, 15:55
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16861
Location: In your JS exploiting you and your system
revolution
So I'm guessing you are enforcing the layout of the proc with all common variables defined only in one place and all labels must have a prefix dot? If you want to encourage more people to use Fresh (as seems to be the case) then would it not be prudent to allow for other styles if people so wished?

Edit: Cross post with typedef. My comment was intended for JohnFound.
Post 28 May 2014, 15:56
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Quote:
If you want to encourage more people to use Fresh (as seems to be the case) then would it not be prudent to allow for other styles if people so wished?

Fresh IDE does not require the use of FreshLib at all. It is easy to set whatever the user library prefer. Fresh IDE tools are not FreshLib centric and any report about compatibility issues with another set of libraries will be considered a bug, until is proved, that this feature can not be implemented for this set of libraries.

@typedef - The only thing that "looks" like Pascal in this case is the macro "begin" and it have nothing to do with the OOP library, it is inheritance from the "proc" macro syntax.

Anyway, how should "look" object oriented extension of assembly language?

P.S. If someone does not like the word "begin" he always can use:
Code:
start fix begin    
Post 28 May 2014, 16:13
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
m3ntal



Joined: 08 Dec 2013
Posts: 296
m3ntal
Why must all parameters, locals, methods, etc, begin with a dot? It has nothing to do with anonymous labels. Why does the following require your HL begin and return keywords? Why can't proc and endp indicate the begin and end of procedures?
Code:
proc f, .a, .b, .c ; why this?
  begin
    ; ...
  return
endp
 
proc f, a, b, c ; instead of this?
  ; ...
endp    
You can't justify it logically. You have no reasons, only personal biased (example: "Because FreshLib does it that way. I'd have to edit my library").
Post 29 May 2014, 19:40
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3

< 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-2019, Tomasz Grysztar.

Powered by rwasa.