|
by: Andrew Dalke |
last post by:
Here's a proposed Q&A for the FAQ based on a couple recent
threads. Appropriate comments appreciated
X.Y: Why doesn't Python have macros like in Lisp or Scheme?
Before answering that, a clarification on what 'macro' means.
A Lisp macro is a way of modifying code when that code is first
defined. It can rearrange the structure of the code, and add and
remove parts of it. Unlike C's #define macro language, Lisp
macros understand the...
|
by: mike420 |
last post by:
I think everyone who used Python will agree that its syntax is
the best thing going for it. It is very readable and easy
for everyone to learn. But, Python does not a have very good
macro capabilities, unfortunately. I'd like to know if it may
be possible to add a powerful macro system to Python, while
keeping its amazing syntax, and if it could be possible to
add Pythonistic syntax to Lisp or Scheme, while keeping all
of the...
|
by: Alex Stevens |
last post by:
Hi All,
I was hoping that someone could put me in the right direction with a utility
I'm trying to write for myself.
I would like to have a search which would find a string anywhere in my
current project, and copy the whole line either to a ouput window, or
optionally to a file.
Where would I even start with this.
Would someone give me a few pointers?
|
by: Michael B Allen |
last post by:
I just noticed that doing something like the following may fail because
it can overwrite u->size before it's evaluated.
memcpy(u, buf, u->size);
Is it legit that this is a macro as opposed to a function that would
not clobber the parameter?
Just surprised me a little is all.
|
by: David |
last post by:
Hi,
I am using header file for driver so Can I define macro to call Kernel
function ?
What are the generatl rules for defining macro.
- David
|
|
by: Garibaldi |
last post by:
Folks.
This began today. I have many macros. Selecting a macro in the macro
explorer then either double clicking on the macro or right clicking and
selecting run no text is auto-typed into the IDE code window. IOW, macros
don't work for some reason.
BTW, the cursor changes to "Run" the returns to normal as if the macro did
function properly.
|
by: Srinivas Mudireddy |
last post by:
Hi,
I am facing a problem with trying to conditionally compile inside a
macro. I have a macro
#define SET_VAL(x, y) ((x) = *(y))
But the problem is y can be NULL in which case I want to set x to 0. So
I modified macro to
#define SET_VAL(x, y)
|
by: aaragon |
last post by:
Hi everyone. A very simple question. I would like to know what is
better in terms of performance. I want to use a simple function to
obtain the minimum of two values. One way could be using a macro:
#define min(a,b) ((a<b)?a:b)
I thought that another way could be to use a template function:
template <class T>
T min<T a, T b>
|
by: Francois Grieu |
last post by:
Consider this macro
// check if x, assumed of type unsigned char, is in range
#define ISVALID(x) ((x)>=0x20 && (x)<=0x7E)
Of course, this can't be safely used as in
if (ISVALID(*p++)) foo();
where p is a pointer ot unsigned char.
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|