Skip to main content

Questions tagged [preprocessor]

A program that processes input data to produce output that is used as input to another program. Use this tag for questions about an unspecified pre-processor. If there is a specific tag for the pre-processor you should use that. Consider using [tag:c-preprocessor], [tag:boost-preprocessor], [tag:oracle-pro-c], [tag:css-preprocessor], [tag:karma-babel-preprocessor], [tag:m4]

0 votes
0 answers
8 views

Understanding GCC Compilation: Preprocessing vs Linking with Libraries

I have a question regarding compilation with GCC. I have a slight confusion that I believe I've figured out but would like confirmation on. In the first compilation step, preprocessing (cpp) organizes ...
DLR's user avatar
  • 1
-2 votes
1 answer
115 views

why division doesn't work with #define numbers? [duplicate]

#define BLUR 2 #define LEN (2 * BLUR + 1) * (2 * BLUR + 1) using namespace std; int main() { cout << 50 / LEN; // result is 50 } the expected result is 2 but it's 50. I try another numbers ...
reza sohrabi's user avatar
1 vote
1 answer
76 views

How to remove comments from the scala code

Any ideas how to remove comments from the scala code so that: Nested multi line or single line comments are removed. Comments inside string literals are not removed. Code can have single and triple ...
user4955663's user avatar
  • 1,061
0 votes
1 answer
70 views

"Preprocessing" a Python function, to avoid excess evaluation of conditional logic

I am writing some Python code that includes functions with two sets of parameters. The first set of parameters will be different every single time the function is called. The second set of parameters ...
Jack MacArthur's user avatar
-1 votes
0 answers
74 views

variant coding in cpp [duplicate]

#ifdef CONFIG1 == TRUE function(Variant1) #else function(Variant2) #endif How to achieve this in c++? Return of both function is same In the following example, based on the config1 value it will ...
PAWAN KUMAR M's user avatar
1 vote
1 answer
54 views

Doxygen not generating the documentation for a function declared inside `#ifdef X` `#endif`

I am making a library in C and writing internal documentation for it using Doxygen 1.9.4. I have a following header, included both from library source (in this case LIBRARY_SOURCE is defined) and from ...
Kirill's user avatar
  • 11
3 votes
2 answers
97 views

Is there any way to get the C precompiler to use a mathematical result when concatenating symbols?

I have a C macro that concatenates bits together in order to resolve to other macros. I'll demonstrate using an admittedly pointless macro called MULT which multiplies two numbers. So long as I pass ...
Bri Bri's user avatar
  • 2,329
0 votes
0 answers
9 views

clang-format indent variables between PPD

Anyone who knows to get clang-format handle this: #ifdef SOMEPREDEF uint32_t int1 = 333; uint32_t int2 = 444; #else uint32_t int1 = 222; uint32_t int2 = 555; #endif instead of this: #...
ED8500's user avatar
  • 51
-1 votes
1 answer
35 views

Why cannot I use LabelEncoder?

I have a sample dataset df = pd.DataFrame({ 'team': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'], 'points': [12, 15, 19, 22, 24, 25, 26, 30] }) I want to label the column team using LabelEncoder ...
Nguyen Hai - HUB's user avatar
0 votes
1 answer
17 views

Trouble Extracting and Utilizing Tokens Across Thread Groups Using JSR223 Preprocessor

I am trying to use JSR223 preprocessor to extract token from login and using it in other thread group of my test plan, but i am not getting it , i tried to add debugger , but token is not present in, ...
mayuri's user avatar
  • 131
1 vote
1 answer
92 views

In the C preprocessor does #define incorporate previous #defines?

With these #defines without arguments #define r 31 #define UMASK (0xffffffffUL<<r) #define LMASK (0xffffffffUL ^ UMASK) will UMASK be identical to (0xffffffffUL<<31) and LMASK be ...
robert bristow-johnson's user avatar
1 vote
0 answers
51 views

How to Align Preprocessor Directives (#) with Code Blocks Using clang-format?

I am using clang-format to format my C++ code. However, I want to align preprocessor directives (including the # sign) with the surrounding code blocks. Currently, clang-format aligns the directives ...
Mahdi Ghasemi's user avatar
0 votes
1 answer
84 views

Add and Retrieve GCC_PREPROCESSOR_DEFINITIONS value in Swift

I've multiple target created in my project. Now I'm planing to add a string UUID to all the targets GCC_PREPROCESSOR_DEFINITIONS aka Preprocessor macro. I'll add this to Alpha, Beta, Lite & Prod. ...
mefahimrahman's user avatar
1 vote
1 answer
78 views

cPreprocess versus templating in C++ for non-type template

I have a C++ function that does a nested for loop with identical calculations two times, each nested for loop acts on different data, and over slightly different array/loop indexes, but are doing the ...
Kschau's user avatar
  • 156
1 vote
1 answer
30 views

Resources on preprocessing pdf files + other data before running with Marqo

I was wondering if anyone had any good resources on preprocessing pdf files and other data before running it through Marqo, the vector search engine? I'm just looking for best practices on data ...
codetrees's user avatar

15 30 50 per page
1
2 3 4 5
126