flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > fasmg suggestion to expand expressions with logical ops |
Author |
|
Tomasz Grysztar 20 Mar 2017, 09:57
It could be possible to create the operators that would work in numeric expressions and compute logical operation with numeric (1 or 0) result, but I feel that it could be a bit confusing when we also have an additional class of operators that can be used to build actual logical expressions. fasm's language uses a design when these kinds of expressions are separate entities, and numeric expressions are themselves elements that a logical expression may be built from (like numbers are elements to built numeric expression). I feel that this approach plays well with my general view of fasm's syntax as "one statement per line"-like language. In fasmg I have kept the expression evaluation as close to fasm's as possible (in most places it is fully compatible).
|
|||
20 Mar 2017, 09:57 |
|
revolution 20 Mar 2017, 11:24
Sometimes I think people want fasm(g) to be a C clone.
The terrible double/single equals and the amount of bugs it has caused in C code are innumerable. Code: ;C style if (x = 1) { ;OMG I forgot to use == do something } |
|||
20 Mar 2017, 11:24 |
|
Tomasz Grysztar 20 Mar 2017, 12:00
revolution wrote: Sometimes I think people want fasm(g) to be a C clone. |
|||
20 Mar 2017, 12:00 |
|
zhak 20 Mar 2017, 12:16
revolution wrote: Sometimes I think people want fasm(g) to be a C clone. No, I don't want a C clone and I used == as the first that came to mind just to express the idea easy to follow -- being able to wrap 3 or more if-else statements into one-line expression |
|||
20 Mar 2017, 12:16 |
|
revolution 20 Mar 2017, 12:23
zhak wrote: ... being able to wrap 3 or more if-else statements into one-line expression |
|||
20 Mar 2017, 12:23 |
|
zhak 20 Mar 2017, 12:32
It could lead to faster source processing and decreasing compilation time. Ain't it good?
|
|||
20 Mar 2017, 12:32 |
|
revolution 20 Mar 2017, 12:35
zhak wrote: It could lead to faster source processing and decreasing compilation time. Ain't it good? |
|||
20 Mar 2017, 12:35 |
|
guignol 20 Mar 2017, 13:57
Could use 'isof'.
Want for speedy application compilation is the indication of bad design. |
|||
20 Mar 2017, 13:57 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.