flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
bitRAKE 08 Jun 2025, 05:28
That might conflict with actual namespace 1,2,3 though.
Terminology is difficult when the language has such flexibility. |
|||
![]() |
|
Greg_M 08 Jun 2025, 05:32
Can a non-special namespace have a name that starts with a number?
|
|||
![]() |
|
bitRAKE 08 Jun 2025, 05:41
Code: namespace ?1 end namespace |
|||
![]() |
|
Greg_M 08 Jun 2025, 05:47
Documentation:
Quote: Numbers are distinguished from names by the fact that they either begin with a decimal digit, ... Is your example an exception to the concept (rule) that a name does not begin with a decimal digit? Perhaps the '?' suppresses the interpretation as a number. Last edited by Greg_M on 08 Jun 2025, 06:27; edited 2 times in total |
|||
![]() |
|
bitRAKE 08 Jun 2025, 06:06
Greg_M wrote: Perhaps the '?' suppresses the interpretation as a number. Code: namespace tester namespace ?1 grape = 1 end namespace end namespace repeat tester.1.grape display 'Hello World!' end repeat |
|||
![]() |
|
Greg_M 08 Jun 2025, 06:18
I appreciate the example. Then, with regard to the point of my OP, one could call the namespaces:
. Special Namespace 1 .. Special Namespace 2 ... Special Namespace 3 and so forth |
|||
![]() |
|
bitRAKE 08 Jun 2025, 06:29
"unnamed" seems more literal to me. Also, I always imagine there could be other "special" namespaces in the future, and it reduces the need to re-learn old concepts with new names. The language certainly has corners. Maybe different naming would see these special namespaces with more use?
I just think the manual is very dense and could probably be expand to a 500 page manual with extensive examples. Only so many hours in a day. |
|||
![]() |
|
Greg_M 08 Jun 2025, 06:45
It's a suggestion. No need to rush a decision. As a very recent (new) student of FASM, I can offer an objective experience/perspective. I.e. I understood the concept, but I think that a specific moniker is helpful to me when I encounter documentation of syntax that corresponds to a uniquely identified entity, as is the case for the specific namespace that corresponds to a specific number of dots.
The goal is to be helpful, of course. FASM appears to be a powerful tool, so it's worthy of large growth/uptake IMO. Granted, assembly is not a popular language in general, but I think FASM could even change that e.g. grow as a tool for higher-level language development as an abstraction layer above the machine. fasmg appears to be geared toward this. (I have an assembly/C/C++/C#/F#/JavaScript/HTML/CSS background and am interested in memory safety language features for C as well as a language with modern syntax. I'm excited to have found fasm/fasmg. I have encountered fasm, e.g. in web searches over the years, but only recently made the decision to use assembly language and learn and use fasm.) Ironically, even your exposition that a number could be used as a namespace name by use of preceding '?' could perhaps be clearer in the documentation: Quote: "?" character ... used in a context where identifier could mean something different than a label or variable to be defined. So, neither a label nor a variable can ever begin with a decimal digit. These entities and other types of named entities, such as namespaces could be introduced along with which ones the '?' is applicable to. I think that, e.g., a table of all named entity kinds and a column for whether they can ever begin with a decimal digit and a column for whether '?' can override and what '?' can override, would help delineate the various possibilities. Last edited by Greg_M on 08 Jun 2025, 07:30; edited 2 times in total |
|||
![]() |
|
bitRAKE 08 Jun 2025, 07:17
I'm sorry if it seemed like I was down-playing your feedback - that is certainly not my intent.
The nuance you've reflected on regarding '?' might arises because it was added later - it becomes an exception to prior statements. Hence, why it concludes section two: the manual wrote: Any identifier can be prepended with a ? character and such modifier has an effect when it is used in a context where identifier could mean something different than a label or variable to be defined. This modifier then suppresses any other interpretation. Last edited by bitRAKE on 08 Jun 2025, 07:35; edited 1 time in total |
|||
![]() |
|
Greg_M 08 Jun 2025, 07:28
No problem at all, and thank you. You entertained my feedback and shared your thoughts. Discussing, itself is a good exercise for my learning. I can see that fasmg has rich capabilities and I have much to learn.
![]() |
|||
![]() |
|
Tomasz Grysztar 08 Jun 2025, 10:14
bitRAKE wrote: Perhaps that last paragraph could be worded differently to make it clear a number is prepended with a '?' becomes an identifier. |
|||
![]() |
|
Greg_M 08 Jun 2025, 16:47
Sounds great. Agree, examples are the crestal explanation.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.