Errors, bugs, questions - page 2354

 
fxsaber:

Well, since two people have already stated that there is a solution without additional variables, I will think about it at the weekend.

I wonder who said that? PrevHandle needs to be stored somewhere anyway.

 

encountered such a problem:

updated Windows, after updating in the terminal the connection to the community account failed, after entering login and password I had to install EA bought in the market again (use new activation), if after every Windows update I have to use new activation they will run out very quickly, how to deal with this, maybe someone has faced?

 
Alexey Navoykov:

I wonder who claimed that? PrevHandle needs to be stored somewhere anyway.

Maybe you got it wrong.

 
fxsaber:

How are you getting on?

This should work as expected:

int MACROS_helper_PrevHandle;
template <typename T>
T macros_helper_fn(T t)  {SelectHandle(MACROS_helper_PrevHandle); return t;}     
#define  MACROS(NEW_HANDLE_, FN_)  ((MACROS_helper_PrevHandle=GetHandle())*0 == 0 ?     \
                                    SelectHandle(NEW_HANDLE_) ? macros_helper_fn(FN_) : 0 : 0)
Overriding the function is not just for fun.
 
Alexey Navoykov:

PrevHandle needs to be stored somewhere anyway.

Hint #4: No need
Everyone has even shown the maps by now. Hint #5 would already be the macro itself
 
pavlick_:

How are you getting on?

Honestly, I haven't even thought about it yet. When I have time, I will definitely see what I can do.

 
A100:

Everything works:

When else will there be such an opportunity... to test the real level...
Judging from the discussions... here... serious proggers cleverly juggling high-sounding words, including about OOP, etc. (I sometimes don't even understand more than half of the sayings)

And what's real?! Tinsel? Or not everyone has joined yet?
I must stress once again: if something complicated...unusual or requiring special knowledge - I would write it immediately, and here - the simplest (!). So turn on your brain and write options... Or wait!

It's kindergarten.

 
A100:
Hint #4: You don't have to.
I've already shown you all the cards.

How is it not necessary, if the essence of the task: remember the old handle, select the new handle, get the value of the function, select the old handle, return the value of the function. Perhaps you solve some other task. Or are you saying that this particular task you solve exclusively inside a macro, without any external additions?

p.s. We should have posted all this in branch"Peculiarities of the language...". This branch is for other purposes.

 
Alexey Navoykov:

p.s. We shouldn't have flooded the thread. We should have posted all this in the"Language Features..." thread. It's for other purposes here.

I didn't think a technical question would get into the floodwaters. Please ask the moderators to clean it up and move it.

 
Why put extra work on the moderators? If someone considers their posts to be flooding, let them delete them themselves. It goes if there are deviations from the topic. And where is the deviation? There are no special features here either, everything is the same as in C++ (I checked). The thread is fairly well-attended... I personally haven't seen an answer to my question in the form of an acceptable code - so "it's OK DJ".
Reason: