Skip to main content
9 votes
1 answer
186 views

[charconv.to.chars] says the following: The functions that take a floating-point value but not a precision parameter ensure that the string representation consists of the smallest number of ...
Jan Schultke's user avatar
  • 44.5k
0 votes
2 answers
43 views

This file splits the text variable from book, chapter, and verses. It should ideally look like this: [ { "book": "PLACEHOLDER", "chapters": [ { &...
Omar M's user avatar
  • 19
1 vote
0 answers
58 views

I'm working with multiple levels of macros where I rely on stringification of the parameters. My own functions have quite a few parameters already and stringizing them effectively doubles the number ...
Jens Petersen's user avatar
1 vote
0 answers
50 views

I have some numeric constants in my data definition and would like to be able to use them inside my strings without having to embed them at runtime. Is this possible in MASM? .data LOWER_BOUND = 50 ...
Iain's user avatar
  • 211
0 votes
1 answer
186 views

Those macros are compiled without error with visual studio and codewarrior compilers. With gcc the error is shown in the comment #define STRINGIFY(x) #x #define MYINC(n) STRINGIFY(extensions/##n#...
bttcld's user avatar
  • 87
1 vote
2 answers
402 views

I'd like to print the type that typeof() outputs, but typeid is only available in C++. Why can't I use stringification to get the name of this type? #define GET_STRING(s) #s #define example(input) ...
Kyle Ponikiewski's user avatar
0 votes
1 answer
66 views

As you know, there are certain cases (e.g., use in workers) when functions need to be serializable (and, at the other side, deserializable of course). I have such a case; a library function (i.e. I ...
Remirror's user avatar
  • 774
2 votes
1 answer
779 views

I am trying to use this macro definition in C: #define STR(x) #x Is it possible to contain some escape sequences inside x? e.g., I want to define a string like: char* str = "\'"; This ...
FUKUAN WANG's user avatar
0 votes
1 answer
212 views

I have the following piece of code: template<int maxRegNum> void f(MuliInstr instr); template<> void f<0>(MuliInstr instr) { if (instr.regA == 0) asm volatile ("mov r4, r0&...
Steve's user avatar
  • 73
0 votes
1 answer
60 views

typedef enum { ENUM1_A=0, ENUM1_B, }someEnum1_e; typedef union { someEnum1_e value; }someEnum1_e_t; #define GET_ELEMENT(data_name) blah.#data_name int main (void) { someEnum1_e_t ...
Guillaume D's user avatar
  • 2,378
2 votes
2 answers
613 views

Is it possible to have stringification after numeric evaluation? This is better explained with a simple example: #define A 1 #define B 2 #define SUM (A + B) #define STR_IMPL_(x) #x #define STR(x) ...
ZioByte's user avatar
  • 3,126
4 votes
3 answers
3k views

I am storing my array as a mixture of array an array and an object. For example assume this one: let arrObj = []; arrObj["x"] = 12; arrObj.push(12); arrObj["y"] = 15; arrObj.push(15); // result: ...
ConductedClever's user avatar
6 votes
2 answers
157 views

It has the deceivingly simple code: method match(Any:U: |) { self.Str; nqp::getlexcaller('$/') = Nil } However, this is the behavior it has: (^3).match(1) # OUTPUT: «「1」␤» So far, so good. say (1,...
jjmerelo's user avatar
  • 23.6k
1 vote
1 answer
556 views

I have a LOG(fmt, ...) macro that does not work when using a char buf[] as fmt. The code below is a complete (not actually) working example of the code. In some_function(), I am trying to use LOG() ...
Daniel C's user avatar
  • 2,539
-1 votes
1 answer
59 views

I've been reading about stringification and token pasting and I was trying to access a variable using token pasting and modifying it's value. Is such a thing possible? Suppose variables a0 and a1 are ...
NISHIT KHARA's user avatar

15 30 50 per page
1
2 3 4 5
12