Comments (7)
@SQF#3423
#define QUOTE(x) #x
#define MODULE ACE_medical
#define QGVAR(x) QUOTE(MODULE##x)
#define HIT_STRUCTURAL QGVAR($#structural)
[HIT_STRUCTURAL, 0]
Actual:
[WORK] <ARRAY> ["ACE_medical#$#structural",0]
Expected:
[WORK] <ARRAY> ["ACE_medical$#structural",0]
from runtime.
The expected result actually is invalid:
Input File
#define QUOTE(x) #x
#define QGVAR(x) QUOTE(ace_test_##x)
#define HIT_STRUCTURAL QGVAR($#structural)
HIT_STRUCTURAL
#define QUOTE2(x) #x
#define QGVAR2(x) QUOTE2(#x)
#define HIT_STRUCTURAL2 QGVAR2($#structural)
HIT_STRUCTURAL2
Output File
#line 1 "C:\Users\marco.silipo\Documents\Arma 3 - Other Profiles\X39\missions\test.VR\pptest2.c"
"ace_test_##$#structural"
"#$#structural"
from runtime.
Still, fixed in 9a198e9 (according to arma)
from runtime.
The expected result actually is invalid:
You used different code.
#define QGVAR(x) QUOTE(ace_test_##x)
vs
#define MODULE ACE_medical
#define QGVAR(x) QUOTE(MODULE##x)
#define QUOTE2(x) #x
#define QGVAR2(x) QUOTE2(#x)
#define HIT_STRUCTURAL2 QGVAR2($#structural)
HIT_STRUCTURAL2
Why are you forcing a #
to the start using QUOTE2? That's not what my code did.
from runtime.
Double read, just accidentially copied the second Part too 🙈
from runtime.
Ahh, now I See, you talk about the second comment you made
Is second still not working as expected I guess?
from runtime.
Both my reproduction code examples where wrong.
#define QGVAR(x) QUOTE(ace_test_##x)
#define QGVAR(x) QUOTE(MODULE##x)
Doesn't work as concat inside a argument for another macro is not evaluated before the sub-macro is called.
Here is real reproduction of the whole macro chain without ommiting parts for simplicity and breaking it because I don'tu understand how the preproc works
#define QUOTE(x) #x
#define PREFIX ACE
#define COMPONENT medical
#define DOUBLES(var1,var2) ##var1##_##var2
#define ADDON DOUBLES(PREFIX,COMPONENT)
#define GVAR(var1) DOUBLES(ADDON,var1)
#define QGVAR(var1) QUOTE(GVAR(var1))
#define HIT_STRUCTURAL QGVAR($#structural)
entry = HIT_STRUCTURAL
That would be example for a config.
from runtime.
Related Issues (20)
- [BUG] compileFinal keyword does not compile correctly
- Make Pre- and Post- increment/decrement operators work on all types
- [BUG] SQC ">=" not working
- [BUG] CLI shows the renamed vm__ internal command
- [BUG] Null config causes fatal error on config commands HOT 2
- [BUG] Config select selects in the configFile hierarchy HOT 1
- [BUG] configClasses returns properties HOT 1
- [BUG] Infinite while loops
- [BUG] Scheduled executes with blocked unscheduled HOT 1
- [BUG] Sorting of nested arrays is broken
- [BUG] Include files are included from current directory rather than file directory HOT 5
- Implement IsServer HOT 1
- [Feature] Support CfgFunctions natively HOT 3
- [Feature] Support referencing functions via virtual path
- text implementation HOT 2
- Simplify calling of SQF code from the CLI HOT 3
- Implement missing preprocessor commands & macros
- [BUG] Passing a non-existent file as --input-pbo results in that file being created
- [BUG] `If` statement partially broken in `development` branch
- [BUG] `--cli-file` command line parameter broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runtime.